Declares one or more customized data structures.
||Single-valued text defining the type of structure to declare|
||Whether to modify (instead of redefining) existing structures (
||Identifiers of the structures|
||Values for each structure|
||Extra text associated with each identifier|
DECLARE is used to set up compound data structures of a customized type. The form of each customized type is defined using the
STRUCTURE directive. So, for example, after defining a
complex_number type, by
STRUCTURE [NAME='complex_number'] 'real','imaginary';\
we can declare
a complex number C by
DECLARE [TYPE='complex_number'] C; VALUES=!p(3,2)
VALUES parameter allows values to be defined for the structure, similarly to the
VALUES parameter of the
POINTER directive. So, here, the real part of the number
C['real'] is given the value 3, and the imaginary part
C['imaginary'] has the value 2. The
EXTRA parameter is also used as in the
POINTER directive, enabling extra text to be associated with the structure for annotation, and the
MODIFY option allows an existing structure to be modified.
Commands for: Data structures.