Control and Flow

Control and Flow

This section outlines the commands to conditionally execute code and control the flow of the program. Here is a quick list of these commands:
IF Statements
Executes or skips a sequence of statements, depending on the value of a Boolean expression.
DO Loops
Repeats instructions based on the results of a comparison.
FOR Loops
A control flow statement which allows code to be executed iteratively.
GOTO/GOSUB
Causes an unconditional jump or transfer of control from one point in a program to another.
SUB
Allows you to "substitute" names instead of actual line numbers as the target of
GOSUB
s and
GOTO
s.
EXIT
Used to exit the
DO
and
FOR
loops.
END
Terminates any program currently running.