Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split text and save variables
#3
Another method:

Macro 8
Code:
Copy      Help
out
str s =
;221 41
;51 122
;11 10

ARRAY(str) a1 a2
str line
foreach line s
,sub.SplitString line a1 a2

out "Array1:"
out a1
out ""
out "Array2:"
out a2

#sub SplitString
function str&x ARRAY(str)&a1 ARRAY(str)&a2

ARRAY(str) a
int ntok=tok(x a)
a1[]=a[0]
a2[]=a[1]


Messages In This Thread
Split text and save variables - by BK - 07-20-2018, 10:37 AM
RE: Split text and save variables - by Gintaras - 07-20-2018, 04:13 PM
RE: Split text and save variables - by Start_Learning - 07-20-2018, 05:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)