Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The simplest way to convert a number?
Message
 
 
To
31/10/2001 04:27:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00575272
Message ID:
00575664
Views:
23
>>Hi everyone,
>>
>>I'd like to convert numbers to the following:
>>
>>5->5
>>52->50
>>333->300
>>4567->5000
>>1234567->1000000, e.g. to the round number.
>>
>>What would be the simplest algorithm for this?
>>
>>Thanks in advance.
>
>Nadya,
>Dragan's round(tnNumber, -floor(log10(abs(tnNumber)))) is not a solution ???
>Cetin

All suggested methods work, but I just found, that I don't need to convert :)
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform