Document Templates : DGL Statements : Declaration Statements : VARIABLE Statement

VARIABLE Statement

Statement Syntax:

VARIABLE data-type identifier [:= value],... ;

Variables are identifiers whose values may be changed in other DGL statements.

The keyword VARIABLE appears only once in the declaration section, before the data-type assignments for variables. Each data-type statement may be followed by as many identifiers of the same type as you wish to define.

For Example:

VARIABLE STRING act_name, act_syn, act_desc;

As many type statements as desired may follow the VARIABLE keyword. For example:

VARIABLE
string activity_name;
float a:=3.243;
activity act_id;

Value assignments are optional (we made one such assignment in the above example). If they are assigned, they represent the default value of the variable at the first generation of a particular document. The value may be any expression that does not contain other variables or parameters.

Variables that are declared as Statemate elements and list of items may not be assigned initial values.