Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get decimal portion
Message
 
To
13/05/2007 11:20:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01225039
Message ID:
01225201
Views:
21
Dragan,

Yes, you are right. If Reza wants to get the decimal part of both negative and positive numbers, Abs() should be applied beforehand.

Thanks,
Ben


>>Reza,
>>
>>Try:
>>? 987.230%1
>>? Mod(987.230,1)
>
>Though for negative numbers it won't return the value one would expect. The % operator will return the distance between the next integer on the left of the number and the number itself... so while the decimals for -8.133 may be 0.133, -8.133%1 will be 0.867.
Previous
Reply
Map
View

Click here to load this message in the networking platform