Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP And Float data type
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00258195
Message ID:
00258296
Vues:
14
Wow, you are good !! Thanks a lot. And now how do i convert the numeric value 1.9988 back to the string Chr(174)+chr(216)+chr(255)+chr(63)

A million tanks.

>That's a parameter type SINGLE, assuming that it's IEEE 754 compliant. As I remember, there's a bug related to the SINGLE parameter return value; Christof Lange and I have proven out the following code to convert a single contained in a VFP string (usually a part of a structure) back to a VFP numeric in straightforward fashion using RtlMoveMemory():
>
>
FUNCTION ConvertSINGLEToVFPNum
>LPARAMETER tcSingle
>* tcSingle is a 4 byte representation contained in a VFP string
>DECLARE RtlMoveMemory IN WIN32API AS RtlCopyDbl ;
>	SINGLE @DestNumeric, ;
>	STRING @pVoidSource, ;
>	INTEGER nLength
>LOCAL lnNum
>lnNum = 0.000000000000000
>=RtlCopyDbl(@lnNum, tcSingle, 4)
>RETURN lnNum
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform