Information générale
Catégorie:
Codage, syntaxe et commandes
>>Position 1 will either be a 4 or a c. 4 indicates a positive number and c indicates a negative.
>>
>>Position 2 gives the number of decimal points.
>>
>>The following the following five positions are the actual number.
>
>Given those 7 Ascii characters in cMyStr:
>cSign=Upper(Left(cMyStr,1))
>nDecimals=Val(Substr(cMyStr,2,1))
>cDigits=SubStr(cMyStr,3)
>nValue=HexToNumeric(cDigits) / (10 ** nDecimals) * iff(cSign="4",1,-1)
>
>you didnt't say if decimal points is given in hex or not but unless the number has more than 9 decimal places it won't matter. Test:
>c200431 would be -10.73
Mark:
Thanks for your help. I will give this a shot. It is beginning to make a bit of sense.
Thanks again...
jd
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement