Skip to content

Instantly share code, notes, and snippets.

@raspberrypisig
Created September 15, 2020 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raspberrypisig/10dad1e569d0bcf4c39d27737cf1d698 to your computer and use it in GitHub Desktop.
Save raspberrypisig/10dad1e569d0bcf4c39d27737cf1d698 to your computer and use it in GitHub Desktop.
'type suffix (default integer, ! for float, % for number, $ for string)
SUB SETUP
PRINT "Running setup..."
END SUB
SUB MAIN(STATE)
IF STATE = 1 THEN
PRINT "Doing nothing..."
ELSE IF STATE = 2 THEN
TASK1
ELSE
TASK2
END IF
END SUB
SUB TASK1
PRINT "task 1"
END SUB
SUB TASK2
PRINT "task 2"
END SUB
SETUP
DO
INPUT "Type a number [1-3]:"; STATE
MAIN(STATE)
LOOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment