Declares one or more dummy data structures.
Options
VALUE = identifier |
Value for all the dummies; default * |
---|---|
MODIFY = string token |
Whether to modify (instead of redefining) existing structures (yes , no ); default no |
IPRINT = string tokens |
Information to be used by default to identify the dummies in output (identifier , extra ); if this is not set, they will be identified in the standard way for each type of output |
Parameters
IDENTIFIER = identifiers |
Identifiers of the dummies |
---|---|
VALUE = identifiers |
Value for each dummy |
EXTRA = texts |
Extra text associated with each identifier |
Description
The IDENTIFIER
parameter lists the identifiers of the dummies that are to be declared. Dummies store the identifiers of other structures. These are particularly useful when you want the same series of statements to be used with several different data structures. By using a dummy structure within the statements, you can make them apply to whichever structure you require. The dummy structure is like a plug which can be connected to the structure that you need; the important point is that you can then connect another structure without changing the statements themselves. In nearly all identifier lists Genstat will replace a dummy by the identifier that it stores. The only exceptions are the IDENTIFIER
parameter of the DUMMY
directive itself, the STRUCTURE
parameter of ASSIGN
, the parameters of FOR
, and in the UNSET
function in expressions. (The most obvious occasions where this is useful are in loops and procedures, and there the dummies are declared automatically.)
Values can be assigned to the dummies by either the VALUE
option or the VALUE
parameter. The option defines a common value for all the structures in the declaration, while the parameter allows the structures each to be given a different value. If both the option and the parameter are specified, the parameter takes precedence.
You can associate a text of extra annotation with each dummy using the EXTRA
parameter.
If MODIFY
is set to yes
any existing attributes and values of the dummies are retained; otherwise these are lost. The IPRINT
option can be set to specify how the dummies will be identified in output. If IPRINT
is not set, they will be identified in whatever way is usual for the section of output concerned.
Options: VALUE
, MODIFY
, IPRINT
.
Parameters: IDENTIFIER
, VALUE
, EXTRA
.
See also
Directives: ASSIGN
, FOR
, PROCEDURE
.
Commands for: Data structures.
Example
" Example 1:4-9-1b " SCALAR X,Y; VALUE=1,2 DUMMY A,B,C,D; VALUE=B,C,D,X ASSIGN [NSUBSTITUTE=-1] Y; A PRINT C,D