Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language

The Code Structure of a Macro

Scroll Prev Up Next More
barebones do-nothing macro showing all the necessary and optional parts of a macro

barebones do-nothing macro showing all the necessary and optional parts of a macro

So far, in our presentation of the Macro Language, we looked at the types of data which can be used, then we saw how variables can be used to store this data (or values), then how operators, expressions and functions can be used to obtain a value from a combination of literals, variables and even other nested functions and expressions.

 

A macro contains a mandatory var section, which may be empty, followed by its main begin…end instructions block. Optional compiler directives, function declarations, global declarations, and input declarations precede these sections in the order shown below.

 

•Compiler Directives (optional)

•Function Declarations (optional)

•Global (optional)

•Input (optional)

•Var

•Instructions Block

 

Note that when any of the optional block do appear, they must appear in the above order.

 

In the next topics we will see how all these part must be organized into a macro to be able to use it.

 


Topic 108109, last updated on 08-Oct-2026