Sylvain,
Check out the system capacities in the VFP HELP, just type "system capacities" in the index field,
then you should see:
Minimum value of an integer -2,147,483,647
Maximum value of an integer 2,147,483,647
Digits of precision in numeric computations
Visual FoxPro can handle numbers up to 9007199254740992 (2^53) in exact computations. 16
64 bits = 8 bytes
Largest number = 10 ^ 308 = 2 ^ 1023 -> 10 bits per
exponent + 1 for exp sign plus 1 for the number's sign => 12 bits.
Leaving 52 bits for the mantissa + 1 for implied normalized bit -> 53 bits
LOG10(2^53) = 15.95 decimal digits accuracy.
Hope this helps,
Dawa
>Hi,
>
>Is there a way to find out the maximum possible value of a numeric, float or double variable length field so that I can prevent a numeric overflow error ? That's in a web-based application so I can't bind the field to the control. It seems pretty simple at first but I haven't found a reliable way to do so.
>
>Thanks,
>Sylvain Bujold
>eMAINT Enterprises
Dawa Tsering
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature