Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding
Message
From
21/10/1997 13:43:25
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
21/10/1997 13:39:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00055770
Message ID:
00055808
Views:
29
>>>>>>>>I have a program that calculates a bunch of dollar figures as well as many whole number counts. Somehow I need the dollar figures to always round down(ie. 98.768 = 98.76), and the whole number counts to round up(55.6 = 56). These calculations are spread throughout the many forms and pages that make up the application. I am hoping for some type of SET option.
>>>>>>>>
>>>>>>>>Shane
>>>>>>>
>>>>>>>SET FIXED TO 2
>>>>>>
>>>>>>OOPS...
>>>>>>
>>>>>>SET DECIMALS TO 2
>>>>>>SET FIXED ON
>>>>>
>>>>>OOPS again... FIXED rounds it up...sorry
>>>>
>>>>
>>>>One more...
>>>>
>>>>nDollars = 12.237
>>>>
>>>>nFixedDollars = (INT((nDollars)*100))/100
>>>>
>>>>nFixedDollars = 12.23
>>>>
>>>>I KNOW that works
>>>
>>>Yes it work, but Floor(nDollars) is easier ;)
>>
>>OK, I give up. What's the practical difference between floor() and int()?
>>
>>... where the hell is my user's manual anyway?? .....
>
>OOPS! (My turn!) After checking with the online help, I remarked that Floor() as the same functionality as Int()

OK, this thread is quickly becoming a very large clusterf***. Let's just chalk it up to enthusiasm. Right? OK.
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Reply
Map
View

Click here to load this message in the networking platform