mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-14 16:34:04 +09:00
basic: LABEL statement for GOTO/SUB
This commit is contained in:
12
assets/labeltest
Normal file
12
assets/labeltest
Normal file
@@ -0,0 +1,12 @@
|
||||
10 GOSUB PRINTHELLO
|
||||
20 GOSUB PRINTHAI
|
||||
30 GOSUB PRINTBYE
|
||||
40 END
|
||||
100 LABEL PRINTHELLO
|
||||
110 PRINT "HELLO"
|
||||
120 RETURN
|
||||
200 LABEL PRINTHAI
|
||||
210 PRINT "HAI"
|
||||
220 RETURN
|
||||
230 PRINT "BYE":LABEL PRINTBYE
|
||||
240 RETURN
|
||||
Reference in New Issue
Block a user