Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple math problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01122177
Message ID:
01122285
Views:
21
>>You were also missing a few closing parenthesis in your code (or doesn't VFP 9 require closing parenthesis).
>That's because, unlike Naomi, I did some experimenting, and started with:
>
>y = STRTRAN(STR(x),"0","")
>
>Then I realised it needed to be a number again, so I did:
>
>z=VAL(x)
>
>Then I realised it was real so did
>
>z= INT(z)
>
>Then I threw it all together in one statement but, lordamighty, I forgot the close parenths. Unlike a certain question-asker we all know, I'm sure Naomi would have caught onto that one when th ecompiler complained.

"Excuses: Excuses are the tool of the incompetent. They build monuments of nothing. Those who specialize in them seldom amount to anything. Excuses." <bg>

>
>>LMAO reminds me of that saying that you shouldn't throw rocks if you are in a glass house.
>
>"People in glass houses shouldn't throw stones"
>
>You may well LYAO but the point is I offered a (imperfect) answer, compiled in 2 minutes - I tried, rather than giving up, and rather than lurking and waiting for someone to make a boob.

Well I must admidt that I tried to solve Naomi's original problem, but I looked at it from a mathematical point of view using numbers (which the title and body suggested). I thought about it for about 5 minutes before deciding that it would be so much easier to convert to a string and remove the unwanted zero's that I gave up on the mathematical approach with numbers.

The reason I decided to "pick" on you was because of your inappropriate comment to Naomi.
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform