
MAXLEVEL - recognition of a recursive definition

Calling sequence:

MAXLEVEL := integer

Parameter:

integer   --  positive integer

Summary:

MAXLEVEL is used to recognise a recursive definition, like in a := NIL; a :=
a; a;. Here a would be "infinitely\ replaced by a if the substitution depth
were not limited by the environment variablesLEVELand MAXLEVEL.

If during evaluation of an expression the substitution depth MAXLEVEL has
been reached then the error Recursive Definition is returned and the
evaluation is terminated.  If MAXLEVEL is higher than LEVEL this error is
never returned as the maximum substitution depth is set with LEVEL.

The highest possible value for MAXLEVEL is 231-1. With the assignment MAX-
LEVEL := NIL;, MAXLEVEL is set to the default value 100.

MAXLEVEL is an environment variable.

>>  a1:=b1: b1:=c1: c1:=7: MAXLEVEL:=2: LEVEL:=2: a1;

     Error: Recursive definition

>>  a2:=b2: b2:=c2: c2:=7: MAXLEVEL:=3: LEVEL:=2: a2;

      c2

See also:  LEVEL , level

