Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP And ADO
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00129800
Message ID:
00131105
Views:
28
>The format of 5,2 leaves one byte for the decimal point and four bytes for the
>digits. If you make the fomrat of the field 6,2 then you can strore 3 digits a
>point and two digits. But if you ever store a negative number you must allow
>for the - sign.
>
>Numeric 6,2
>
>111.11 resutls in 111.11
>-111.11 results in ******

Actually, my tests show that it results in -111.1. (VFP6 final, but I'm pretty sure it always worked this way.)
CREATE CURSOR curs(nNum N(6,2))
APPEND BLANK
REPLACE nNum WITH 111.11
?nNum (111.11)
REPLACE nNum WITH -111.11
?nNum (-111.1)
REPLACE nNum WITH -1111.11
?nNum (-1111) (-1111., actually, but the point doesn't display)
REPLACE nNum WITH -11111.11
?nNum (-11111)
REPLACE nNum WITH -111111
?nNum (***.**)
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform