Skip to content

Commit 68ddf11

Browse files
authored
Update 768-string-sinput.markdown
1 parent 92056c7 commit 68ddf11

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

_build/reference/768-string-sinput.markdown

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
Splits the string 'src' into variables which are separated by delimiters.
66

77
```
8-
SINPUT "if x>1 then y"; vif, " ", vcond, "then", vdo
9-
? vcond, vdo
10-
' result=
11-
' x>1 y
8+
src = "if x>1 then y"
9+
SINPUT src; vif, " ", vcond, "then", vdo
10+
print vif, vcond, vdo ' output: if x>1 y
1211
```
1312

13+
```
14+
src = "1456,Peter,8"
15+
SINPUT src; id, ",", name, ",", age
16+
print "ID: " + id
17+
print "Name: " + name
18+
print "Age: " + age
19+
```

0 commit comments

Comments
 (0)