Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple math problem
Message
De
16/05/2006 09:35:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01122177
Message ID:
01122213
Vues:
21
>>>Hi everybody,
>>>
>>>If we have these numbers
>>>123000
>>>130000
>>>140400
>>>
>>>and we need 123, 13, 1404 (e.g. remove the trailing zeros), can we do it without loop? I don't see a way after thinking 3 minutes on the problem.
>>>
>>>Thanks in advance.
>>
>>If x = 123000
>>y= INT( VAL( STRTRAN( STR( x), "0", "")
>>
>>Jeez, Naomi, don't go bursting any blood vessels in your brain thinking on this for more than 3 minutes! :-)
>
>You certanly didn't use your brain on this one. :)

Well it didn't just spontaneously begin to exist!

Yeah, it needs some rethinking, but the point I was making was not that it was a "no brainer" - more about giving up after a mere 3 minutes. It took me c. 2 mins to come up with that. :-)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform