SINPUT
SINPUT src; var [, delim] [,var [, delim]] ...
Splits the string src
into substrings which are
separated by delimiters delim1
to delimN
and
returns the substrings as var1
to varN
.
Delimiters can be single characters, numbers or strings.
Example 1: Split string with delimiter “,”
"1456,Peter,8"
src =
SINPUT src; id, ",", name, ",", age
print "ID : " + id
print "Name: " + name
print "Age : " + age
' Output:
' ID : 1456
' Name: Peter
' Age : 8
Example 2: Split string with complex delimiters
"if x>1 then y"
src = SINPUT src; vif, " ", vcond, "then", vdo
print vif, vcond, vdo ' Output: if x>1 y
Code samples using SINPUT