Next: , Previous: Continue, Up: Statements


6.11.6 The define Statement

A define statement is of the form

     define $var := expr;

The expression expr is evaluated and the result is assigned to the variable $var. The variable may not be defined before this statement; it is defined by the statement and only exists until the statement sequence in which the assignment is situated has been processed fully.

You can assign the elements of a list value to multiple variables at once:

     define <$var1, $var2, ... > := expr;

The first, second, ... element of expr, which must be a list, is assigned to the new variable $var1, $var2, ... respectively. The number of variables must match the length of the list value.