User guide

2.4. DECLARATIONS 27
2.4.2 Manifest Declarations
A MANIFEST declaration has the following form:
MANIFEST { N
1
= K
1
;...; N
n
= K
n
}
where N
1
,...,N
n
are names (see Section 2.2.1) and K
1
,...,K
n
are manifest
constant expressions ( see Section 2.2.10). Each name is declared t o have the
constant value specified by the corresponding manifest expr essi o n . If a value
specification (=K
i
) is omitted, the a value one larger than the previously defined
manifest constant is imp l i ed , and if =K
1
is omitted, then =0 is assumed. Thus,
the declaration :
MANIFEST { A; B; C=10; D; E=C+100 }
declares A, B, C, D and E to have manifest values 0, 1, 10, 11 and 110, respectively.
2.4.3 Global Declarations
The gl obal vector is a permanently allocated region of store that may be directly
accessed by any (separately compiled) section of a program (see S ect i on 2.5. I t
provides the main mechanism for linking together sepa r at el y compiled sections.
A GLOBAL declaration allows a nam es to be explicitly associated with elements
of the global vector. The syntax is as follows:
GLOBAL { N
1
:K
1
;...; N
n
:K
n
}
where N
1
,...,N
n
are names (see Section 2.2.1) and K
1
,...,K
n
are manifest
constant expressions (see Section 2.2.10). Each constant specifies which global
vector element is associated with each variable.
If a global number (:K
i
) is omitted, the next global variable element is im-
plied. If :K
1
is omitted, then :0 i s assumed. Thus, the declaration:
GLOBAL { a; b:200; c; d:251 }
declares the variabl es a, b, c and d occupy positions 0, 200, 201 and 251 of the
global vector, respectively.
2.4.4 Static Declarations
A STATIC declaration has the following form:
STATIC { N
1
=K
1
;...; N
n
=K
n
}