Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Decimal to hexadecimal conversion functions
Message
De
24/01/2001 14:12:21
 
 
À
24/01/2001 14:07:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00464326
Message ID:
00468098
Vues:
30
>I am stuck with this because the client I am doing a little work for is stuck with it.
>
>In VFP, how would one get the decimal equivalent of a hex value?
>
>Thanks.
>

Not exactly sure what you mean. If you have a hex string of digits:

cHexVal = "001A"

to convert that to decimal you can use:

nVal = EVAL("0x"+cHexVal)

You should now have 26 in nVal.

Does that help?

>>>Fred,
>>>
>>>Should this work in FP 2.5 also?
>>>
>>>Thanks.
>>>
>>>Dennis
>>>
>>
>>No, these are VFP functions. You'd have to code up your own in FPx.
>>
>>Why are you still working with that? Come join us in the 21st century! < s >
>>
>>
>>>>>Hi,
>>>>> Is there any function to change the decimal numbers to hexa decimal and vice versa? Or any program codes?
>>>>>
>>>>>Thanks
>>>>
>>>>
>>>>? TRANSFORM(255,"@0")  && 0x000000FF
>>>>
>>>>? 0x000000FF           && 255
>>>>
>>>>
>>>>Does this help?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform