Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert string 1/4 or 1/2 to numeric
Message
From
17/01/2016 21:22:03
 
 
To
17/01/2016 20:53:26
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01629854
Message ID:
01629856
Views:
75
>>Is there a way to convert the string that has a slash to a numeric (without parsing the string)? For example, make "1/4" to .25, "1/2" to ".5" and so one?
>>
>>TIA
>
>depends on your definition of "parsing" ;-))
>
>luR = iif(vartype(m.lcS)=="C" and occurs("/",m.lcS), eval(m.lcS), m.lcS)

How would you reverse that, Thomas?
e.g. convert .25 to "1/4"
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform