|
|||||
Functions and declaration-free programs | |||||
Prerequisite Concepts | Related Syntax |
OmniMark allows programs to be written without declaring any of the counter
, switch
, or stream
variables when the declare heralded-names
declaration is specified or when the "-herald" command line option is specified. This makes it easy to write small prototype programs.
The basic rule that governs the use of declarations in these cases is that either everything or nothing (variable-wise) must be declared. As part of this basic rule, if an OmniMark program contains any function definitions, all variables must be declared. Function definitions, because they declare function names, are considered to be declarations for the purpose of this rule.
Prerequisite Concepts Declaration-free programs Functions Heralds |
Related Syntax declare heralded-names define function |
---- |