RosettaCodeData/Task/Jump-anywhere/QBasic/jump-anywhere.basic
2023-07-01 13:44:08 -04:00

22 lines
280 B
Text

PRINT "First line."
GOSUB sub1
PRINT "Fifth line."
GOTO Ending
sub1:
PRINT "Second line."
GOSUB sub2
PRINT "Fourth line."
RETURN
Ending:
PRINT "We're just about done..."
GOTO Finished
sub2:
PRINT "Third line."
RETURN
Finished:
PRINT "... with goto and gosub, thankfully."
END