Jump anywhere: Difference between revisions

Content added Content deleted
(PascalABC.NET)
(Add SmallBASIC)
 
Line 652: Line 652:
[finish]
[finish]
print "done"</syntaxhighlight>
print "done"</syntaxhighlight>

==={{header|SmallBASIC}}===
SmallBASIC supports both <code>goto</code> and <code>gosub</code>.
<syntaxhighlight lang="qbasic">
print "First loop"
for i = 1 to 10
print i
if i > 5 then gosub LabelGosub
next

print "Second loop"
for i = 1 to 10
print i
if i > 5 then goto LabelGoTo
next

print "done"
end

label LabelGosub
print "Gosub"
return

label LabelGoTo
print "Goto"
</syntaxhighlight>


==={{header|True BASIC}}===
==={{header|True BASIC}}===