About the Return Statement

You use the return statement to terminate execution of a node definition and optionally return a value. This statement has the following 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 do not supply a return value with the return statement:

return;

the value null is returned. That is, return; is the same as return null;.