Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The greatest lower number
Message
From
19/05/2002 10:54:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
The greatest lower number
Miscellaneous
Thread ID:
00658665
Message ID:
00658665
Views:
41
Hello, All

I'm sure that's a piece of cake, but I'm fresh out of brain right now.

Given a specific decimal places, I need to know the nearest number lower that a specified number.
For example:

Decimal places: 2
Given number: 51245.54468
Desired number: 51245.54

Decimal places: 1
Given number: the same as above
Desired number: 51245.5

Decimal places: 0
Given number: the same as above
Desired number: 51245

What's the shortest code to achieve this?

Thank you
Grigore Dolghin
Class Software.
Next
Reply
Map
View

Click here to load this message in the networking platform