EXPRESSION directive

Declares one or more expression data structures.


Options

VALUE = expression
Value for all the expressions; default *

MODIFY = string
Whether to modify (instead of redefining) existing structures (yes, no); default no

IPRINT = strings
Information to be used by default to identify the expressions 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 expressions

VALUE = expression structures
Expression data structures providing values for the expressions

EXTRA = texts
Extra texts associated with the identifiers


Description

The IDENTIFIER parameter lists the identifiers of the expressions that are to be declared. The expression data structure stores a GenStat expression, for example

Hours = Minutes/60

Usually you will find it easiest to type out an expression like this explicitly whenever you need it. The main use, then, for this rather specialized data structure is to supply an expression as the argument of a procedure.

   Values can be assigned to the expressions 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 expression using the EXTRA parameter. If MODIFY is set to yes any existing attributes and values of the expressions are retained; otherwise these are lost.

   Here are two examples using the VALUE option:

EXPRESSION [VALUE=Length*Width*Height] Vcalc

EXPRESSION [VALUE=Dose=LOG10(Dose)] Dtrans

These put the expression Length*Width*Height into the identifier Vcalc, and the expression Dose=LOG10(Dose) into Dtrans. Both expressions could be declared simultaneously, using the VALUE parameter, by putting

EXPRESSION Vcalc,Dtrans; VALUE=!E(Length*Width*Height), \

  !E(Dose=LOG10(Dose))

!E(Length*Width*Height), for example, is an unnamed expression.

   The IPRINT option can be set to specify how the expressions will be identified in output. If IPRINT is not set, they will be identified in whatever way is usual for the section of output is concerned. For example, the PRINT directive generally uses their identifiers (although this can be changed using the IPRINT option of PRINT itself).

 

Options: VALUE, MODIFY, IPRINT.

Parameters: IDENTIFIER, VALUE, EXTRA.