|
|||||
Global variables: declaring | |||||
Prerequisite Concepts | Related Syntax |
Global variable declarations declare a variable which can be referenced anywhere in the program from that point on.
If the name of a declared variable is the same as an OmniMark keyword, then that keyword loses its meaning for the entire program, including that part of the program that precedes the variable declaration. This behavior can be changed with the declare heralded-names
declaration.
No global variable may have the same name as another global variable, even if they are of different types. This behavior too can be changed with the declare heralded-names
declaration.
Global variable declarations, rules, declarations, function definitions, and macro definitions can appear in any order, and they can be intermixed. Global variable declarations cannot appear inside of rules.
Examples of global variable declarations are:
global switch is-present global counter number-of-lines global stream out
Prerequisite Concepts Variables |
Related Syntax global, local |
---- |