Global Variables

Navigation:  Macros > Macro Language > Variables >

Global Variables

Previous pageReturn to chapter overviewNext page

Global variable are variables which retain their value from one execution of a macro to another.


They are somewhat similar to static variables in C++ or assignable typed constants in Pascal.


By global, it is meant that the list, as any other global variable, will maintain its value, throughout one diary generation, for all tokens of the same macro index. Global variables are not shared between tokens of different macro indices


In the Q++Studio Macro Language, global variables are declared in the global section of a Macro.


In the next sections, we will see how Global Variables must be initialized, understand how to take advantage of their scoping rules, cover the precautions that must be followed in using them, and see some examples of their use.

Topic 110031 updated on 03-May-2018.
Topic URL: