192
Manual – IPOSplus®
14
Indirect addressing – pointer
Compiler – Programming
It is a good idea to use the option of defining global variables when the number of the
variable is not important for the application. This is usually the case because the vari-
ables are accessed continually by symbols. Furthermore, global variable declaration un-
derlines the modularity and makes it easier to reuse modules. Standard or user-defined
structures can be used as a recourse if variable groups are required, e.g. for system
functions.
For a description of the system variables H473 to H511, refer to the section "Overview
of the System Variables". A list of system variables and their symbolic identifiers is given
in the appendix.
14.18 Indirect addressing – pointer
The designations *H0 to *H511 are also allowed as variable names in order to make use
of the possibility of accessing variables indirectly (SET [H] = H) from IPOS
plus®
. These
names can be used on both the right and left sides of assignments or in expressions,
such as H0 to H511. In this case, however, the Compiler inserts the indirect commands.
Example for using indirect variables:
Variable H1 is assigned the value 10 because the value 7 is accessed indirectly via *H2
(see H5) and the value 3 is accessed indirectly via *H3 (see H6).
INFORMATION
Multiple declarations of global variables are
not allowed
:
long a, b, c;
long d, a;
H2 = 5;
H3 = 6;
H5 = 7;
H6 = 3;
H1 = *H2 + *H3;
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n