| Applying science to business management |
  
return
The return statement is used to terminate execution of
a node definition and optionally return a value. This statement
has the format
return expression ;
For example, the following definition scans all elements in a
list and returns the first negative value:
First Negative(list):={
for(var n=0; list[n]!=null; n++)
if(list[n]<0)
return list[n];
}
If you don't supply a return value with the return
statement, e.g.,
return;
the value null is returned. That is, return; is the same as return null;.
See Also
Optional return
|