Branching instructions allow you to execute different code, depending on some condition.
In the macro language, there are 2 types of branches:
if-else |
The if type of branch allows you to define 2 paths of execution, depending on the value of a Boolean expression. |
switch |
The switch type of branch allows you to define many different paths of execution, depending on the value of a string or integer expression. |
Note that, as the Boolean data type only has 2 possible values (true/false), the if branch can be considered to be a special case of the switch statement as defined for Booleans.
See also: looping instructions.
Topic 122700, last updated on 18-Apr-2020