In the previous sections we began our study of the Macro Language by looking at the types of data which can be used, then we saw how variables can be used to store this data (or values), and we then saw how operators and functions can be combined into expressions. We will now bring the above concepts together, to learn how to write instruction, code that actually does something.
Instructions are placed in the instructions block, where all the action happens.
As its name suggests, the instructions block consists of a series of instructions. The specifics of how each line of code is written depends on the type of instruction, as we will see in the sections below. However, the following apply to any instruction line:
•Individual symbols (litteral, variable, function, operator, function call) must be separated by at least one space.
•Apart from the above minimum, the number of spaces is irrelevant. It will read 10 spaces as one space. Tabulations are treated as spaces.
•An instruction can be split over multiple lines, using the symbol -> at the end of each line.
•Each type of instruction has its own recommended style of indentation to ensure legibility. It is recommended that you follow it; it will make you code easier to follow and will highlight potential bugs.
In the next sections, we will cover the 4 basic types of instructions: comments, assignment, branches, and loops.
Topic 108185, last updated on 18-Apr-2020