Jump anywhere: Difference between revisions
→{{header|SNOBOL4}}: Made the labels clearer for figuring out how this works.
Ttmrichter (talk | contribs) |
Ttmrichter (talk | contribs) (→{{header|SNOBOL4}}: Made the labels clearer for figuring out how this works.) |
||
Line 2,866:
<syntaxhighlight lang="snobol4">
* Demonstrate an unconditional branch.
OUTPUT = "Unconditional branch." :(SKIP1.START)
OUTPUT = "This will not display."
* Demonstrate a branch on success.
SKIP1
SKIP1.
OUTPUT = "Iteration A" v
v = v + 1 :(SKIP1.
* Demonstrate a branch on failure.
SKIP2
SKIP2.
OUTPUT = "Iteration B" v
v = v + 1 :(SKIP2.
* Demonstrate a combined branch.
* Demonstrate also an indirect branch.
SKIP3
label = "SKIP3.
SKIP3.
le(v, 5) :S(SKIP3.
SKIP3.
EXIT OUTPUT = "Goodbye"
|