Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert number to string and back
Message
From
31/03/2008 12:42:31
 
 
To
31/03/2008 12:38:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01306961
Message ID:
01307020
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform