Name:

return indicates an expression to be returned in a procedure

Usage:

return expression : void

Parameters:

Description:

Example 1:

   > succ = proc(n) { var res; res := n + 1; return res; };
   > succ(5);
   6
   > succ;
   proc(n)
   {
   var res;
   res := (n) + (1);
   return res;
   }

Example 2:

   > hey = proc(s) { print("Hello",s); };
   > hey("world");
   Hello world
   > hey;
   proc(s)
   {
   print("Hello", s);
   return void;
   }
See also: proc, void
Go back to the list of commands