Created
September 18, 2020 22:31
-
-
Save raspberrypisig/c0c340cb418ec3270f338933c558db8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'type suffix (default integer, ! for float, % for number, $ for string) | |
STATE=1 | |
SUB SETUP | |
PRINT "Running setup..." | |
END SUB | |
SUB MAIN | |
IF STATE = 1 THEN | |
PRINT "Doing nothing..." | |
ELSE IF STATE = 2 THEN | |
TASK1 | |
ELSE | |
TASK2 | |
END IF | |
PRINT "Current State:", STATE | |
END SUB | |
SUB TASK1 | |
PRINT "task 1" | |
END SUB | |
SUB TASK2 | |
PRINT "task 2. Now return to state 1" | |
STATE=1 | |
END SUB | |
SETUP | |
DO | |
INPUT "Type a number [1-3]:"; STATE | |
MAIN | |
LOOP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment