|
3.7.4 Names in procedures
-
All variables defined inside a procedure are local to the procedure and their
names cannot interfere with names in other procedures. Without further action,
they are automatically deleted after leaving the procedure.
-
To keep local variables and their value after leaving the procedure, they have
to be exported (i.e. made global) by a command like
export or
exportto (see export,see exportto, see importfrom;
see package). To return the value of a local variable, use the
return command (see return).
Example:
Note that the variable result became a global variable after the
execution of xxx .
|