Convert string to value
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-03-07 07:57 AM
‎2017-03-07
07:57 AM
Thanks in advance
3 REPLIES 3
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-03-07 09:42 AM
‎2017-03-07
09:42 AM
Tsepov wrote:SPLIT (string, format, variable1 [, variable2, ..., variablen])
How I can convert string variable (for example "10.1") to value?
Thanks in advance
The string expression to numeric with using "% n"
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-03-07 09:47 AM
‎2017-03-07
09:47 AM
A bit tricky...
I have real life example from the library I have made some time ago...
They had the types of the object defined with numbers (so had to be strings)
And for some reason I had to get those numbers...
Piotr
I have real life example from the library I have made some time ago...
They had the types of the object defined with numbers (so had to be strings)
And for some reason I had to get those numbers...
VALUES "TYP" "E 104500", "E 104510", "E 104520" (and so on) NN=SPLIT (TYP, "%s %n", TYP_L, TYP_NUM) TYP_NUM6=(TYP_NUM-(TYP_NUM MOD 100000))/100000 TYP_NUM5=(TYP_NUM-(TYP_NUM MOD 10000))/10000- TYP_NUM6*10 TYP_NUM4=(TYP_NUM-(TYP_NUM MOD 1000))/1000- TYP_NUM6*100- TYP_NUM5*10 TYP_NUM3=(TYP_NUM-(TYP_NUM MOD 100))/100- TYP_NUM6*1000- TYP_NUM5*100- TYP_NUM4*10 TYP_NUM2=(TYP_NUM-(TYP_NUM MOD 10))/10- TYP_NUM6*10000- TYP_NUM5*1000- TYP_NUM4*100 - TYP_NUM3*10 TYP_NUM1=TYP_NUM MOD 10Best Regards,
Piotr
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-03-07 06:12 PM
‎2017-03-07
06:12 PM
Thank you very much!
It works!
It works!