|  |  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 exportorexportto(see  export,see  exportto, see  importfrom;
see  package). To return the value of a local variable, use thereturncommand (see  return). 
Example:
 Note that the variable|  | proc xxx
{
  int k=4;        //defines a local variable k
  int result=k+2;
  export(result);  //defines the global variable "result".
}
xxx();
listvar(all);
==> // result                         [0]  int 6
 | 
 resultbecame a global variable after the
execution ofxxx.
 |