SINPUT

SINPUT src; var1 [, delim1] [,var2 [, delim2]] … [,varN [, delimN]]

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 “,”

src = "1456,Peter,8"

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

src = "if x>1 then y"
SINPUT src; vif, " ", vcond, "then", vdo
print vif, vcond, vdo                       ' Output: if    x>1    y
Code samples using SINPUT
String
If there is insufficient information on this page and you wish learn more about SINPUT, please send an email to smallbasic@gmail.com. You can help to improve information about SINPUT by submitting a pull request, click View Source for details. Note, an offline language reference text file is also available - see the Download section.