Set automatic variable declaration mode
Integer_Type _auto_declare
The _auto_declare may be used to have all undefined variables
implicitely declared as static. If set to zero, any variable
must be declared with a variable declaration before it can be
used. If set to one, then any undeclared variabled will be declared
as a static global variable.
The _auto_declare variable is local to each compilation unit and
setting its value in one unit has no effect upon its value in other
units. The value of this variable has no effect upon the variables
in a function.
The following code will not compile if X not been
declared:
However,
_auto_declare = 1; % declare variables as static.
X = 1;
is equivalent to
This variable should be used sparingly and is intended primarily for
interactive applications where one types S-Lang commands at a prompt.
|