Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading a C Real Number with low level 2.6 for DOS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00162949
Message ID:
00163150
Vues:
21
>Sorry, it should have been:
>
>x = asc(fread(mfile,1)) + (asc(fread(mfile,1)) * 256) + ;
>>(asc(fread(mfile,1)) + (asc(fread(mfile,1)) * 256)) * 256 * 256
>
Paul,
I know for a fact that it is floating point. I have the full doc on the files. In a trip to the library last night I found that floating point numbers contain an exponent plus the number. Something like scientific notation but not quite. The books I found said the method is system dependent. The data I am reading was written with a Borland C++ program (I think). The four bytes of the number are different from four bytes of an intiger in that with an intiger the left bytes have values such as 0A 12 00 00 whereas the floating point values are on the right side 00 00 CC 41. I am assuming that the exponent is in x number of bits in the rightmost byte.

John.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform