RosettaCodeData/Task/Flow-control-structures/GW-BASIC/flow-control-structures.basic

8 lines
273 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
10 LET a=1
20 IF a=2 THEN PRINT "This is a conditional statement"
30 IF a=1 THEN GOTO 50: REM a conditional jump
40 PRINT "This statement will be skipped"
50 PRINT ("Hello" AND (1=2)): REM This does not print
100 PRINT "Endless loop"
110 GOTO 100:REM an unconditional jump