Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ROUNDing up
Message
From
13/04/2009 18:26:29
 
 
To
13/04/2009 17:22:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01394685
Message ID:
01394698
Views:
67
>Hi All:
>
>Is there a function out there that will always ROUND up if the following digit is greater than 0?
>
>Examples:
>
>
>ROUND(123.4512,2)   returns 123.45
>ROUNDUP(123.4512,2)   returns 123.46
>
>
>Kinda like CEILING, which only works on the integer level.
>
>Thanks,
>
>Yossi
How about something like
FUNCTION roundup(tnNumber,tnDigits)
RETURN CEILING(tnNumber*10^tnDigits)/(10^tnDigits)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform