And just to round things out, here is my version of the Standard Hi Lo Game written in SB (Shorthand Basic) for my Interpreter built with QB64:
Hi lo game SB.txt b+ 2020-03-07
[
n c 0
[
? g Guess my number from
1 to 100, (0 quits
) i g >= 1
n c c + 1
i g > r
. Too High!
e
i g < r
. Too Low!
e
. You guessed in c guesses!
.
x
f
f
e
. You signaled quit, goodbye!
z
f
]
]
[ starts a loop
] ends a loop
n sets a number variable the very next item in the line is the variable name and the next stuff is number literal or numeric expression for the variables value. (So here, r is the secret number set at the beginning of the round and c is for count as in counting the number of guesses.)
? starts an INPUT statement, next item is the variable name being set and the rest is the propmt string, notice NO double quotes!
i starts an IF branch decision, the stuff following is the expression to evaluate if evaluates to True then execute the next statement else look for an f (the end of an IF block or an e the ELSE block to execute.
. starts a PRINT statement, notice no double quotes BUT if one of the isolated letters or words is a variable name the variable's value will be substituted in for the name.
x of course is for exit loop, the only way out of [ loop code ]
For comments, just don't start a line with a command like [].nxief, but for your comfort use ' to feel safe it wont be used for anything else.
BTW the indents are optional but each executable line must start with executable command. So line 1 is just comment.
One of these days I am going to work in strings and SUBs or FUNCTIONs.