Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with strings
#1
I have n lines. I want to get data seperated by spaces (not fixed) into array. eg "Hello How Are You 1.50 19 0.35" should give Hello, How, Are, You, 1.50, 19, 0.35

I tried tok it works fine for string but when there is double/decimal values it show integer of first and second part.
#2
Macro
Code:
Copy      Help
str s="Hello How Are You 1.50 19 0.35"
ARRAY(str) a; int i
tok s a -1 " "
for i 0 a.len
,out a[i]
,


Forum Jump:


Users browsing this thread: 1 Guest(s)