Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert string 1/4 or 1/2 to numeric
Message
From
20/01/2016 05:34:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/01/2016 18:40:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01629854
Message ID:
01629972
Views:
47
>>I think I am more impressed that you understand than what he wrote :)
>
>I understood it when I read it. Don't ask me to repeat it tomorrow.
>I was fortunate to have as one of my programming mentors a brilliant mathematician who forced this English major to learn to appreciate the beauty of mathematics.
>So, while I'll never be able to do what Lutz does, I can follow it, appreciate its elegance and apply it.

In some cases I also used log10() to count the width of the integer part of a number, as it's rather straightforward and independent of any textual representation of the number. Any number above 1 has int(log10(number))+1 digits to the left of the decimal point. Or, to put it straight, log10(number) gives you the position of the leftmost non-zero digit of the number, counting the ones as the zeroeth, tens as 1st etc, 0.x as -1st, 0.0x as -2nd etc.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform