Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ROUND()
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00342568
Message ID:
00343670
Views:
21
>What I didn't know and have come to realize is that VFP does not store the value of an expression in the memory variable. It stores the expression and display properties of that expression.

Larry,

I believe that that is incorrect. The variable has a number in it, not the expression. The presision of the nember is also stored. For example;
set decimals to 1
lnVar = 7/74*100
?lnVar && shows 9.5
? lnVar + .0000001  && shows 9.4#############
The numbers following the 4 are not 0's, so the actual value in teh variable is not 9.5 as was displayed, but is some other number which was rounded to 9.5 for display.

Also a Display Memory will show you the actual number stored in lnVar without regard to the set decimals setting. It appears that the ROUND() function is not using the displayed value but the actual value.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform