| Up | Next | Prev | PrevTail | Tail |
RLISP supports in symbolic mode the following classes of variables:
These are valid only inside their local context. scalar variables are initialized to nil, integer to 0 unless they have a special initialization value (property initvalue* ).
In this routine x,y and r are local variables.
In algebraic mode the where statment is used to activate one more more rules locally. In symbolic mode mode only rules of the form <name>=<value> are allowed the the right-hand side of a where statement.
);
These can be accessed from everywhere once they have been declared.
Important: declare them before you use them for the first time in a session.
They are initially set to nil.
It is a common practice to use a trailing asterisk in names for global and fluid variables such that they easily can be distinguished from locals. Names of global variables may not be used as local variables.
);. Like global
variables they must be declared before use and they are initially set to
nil.
In this case the variable my_var* has been initialized to the symbol x. If then a call compute(′a,′z) is performed, the variable my_var* will be set to z during the execution of the body of compute.
;
where s1,s2,
are symbols. REDUCE automatically connects a fluid
variable with each switch by prefixing an asterisk to the symbol name. This
variable represents the value of the switch, which is either nil or t and is
set by the statements on and off. E.g. the switch nat has the associated
global variable *nat.
| Up | Next | Prev | PrevTail | Front |