Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple math problem
Message
De
16/05/2006 09:06:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
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:
01122182
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>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.

Yes, replace the zeroes with spaces, apply alltrim(), and then replace the spaces with zeroes (to account for zeroes in between). This can be done in a single expression.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform