Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert number to string and back
Message
De
31/03/2008 12:42:31
 
 
À
31/03/2008 12:38:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01306961
Message ID:
01307020
Vues:
13
This message has been marked as the solution to the initial question of the thread.
>>
>>
>>xxx = transform(1234.56789)
>>yyy = eval(m.xxx) && no QUOTES
>>
>
>Gregory:
>
>This is getting interesting, I was getting a syntax error if I did not use the quotes, so I guessed you forgot them.
>
>Now, I tried again, still syntax error, then I realize that I have SET SYSFORMATS ON so the decimal separator is a ","
>
>Transform is converting the number to a string with a "," so EVAL gave me a syntax error, I should do s SET POINT TO "." before doing the transform:
>
>
>m.lcPoint = Set("Point")
>Set Point to "."
>xxx = transform(1234.56789)
>Set Point to m.lcPoint
>yyy = eval(m.xxx) && no QUOTES
>?xxx
>?yyy
>
>
>Thank you very much, this seems to work.
>
>Carlos

Ok, in that case
xxx = strtran(transform(1234.56789), set('point'), '.')
yyy = eval(m.xxx)
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform