You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
354 B

LET x = 0
GOSUB double
GOSUB add_one
GOSUB double
GOSUB double
GOSUB add_one
IF x == 5 THEN
PRINT "success"
ELSE
PRINT "fail"
END IF
END
PRINT "unreachable (after END)\n"
double:
x = x * 2
RETURN
PRINT "unreachable (after RETURN in double)\n"
add_one:
x = x + 1
RETURN
PRINT "unreachable (after RETURN in add_one)\n"