User Tools

Site Tools


return

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

return [2006/08/29 20:18] (current)
Line 1: Line 1:
 +======Synopsis:​======
 +[[return]] ​ \\
 +[[return]] //<​arguments>//​
 +
 +======Description:​======
 +[[Return]] terminates processing of the current ​
 +  * [[alias command|alias]] (command or function) call,
 +  * [[defer]] command, ​
 +  * [[exec command|exec]] callback,
 +  * [[load]], ​
 +  * [[on]] hook callback,
 +  * [[queue]] command, ​
 +  * [[timer]] command, ​
 +  * [[wait|wait -cmd]] callback,
 +  * [[wait|wait %proc -cmd]] callback, or
 +  * {...} math operator.
 +
 +You may optionally supply a return value which will be assigned to the 
 +//​function_return//​ local variable, which is useful from:
 +  * The body of the {...} math operator
 +  * [[on|on ?type]] handlers
 +  * Any alias function call.
 +
 +Using the [[return]] command outside of one of the above contexts yields
 +an error and has no effect.
 +
 +======Examples:​======
 +   alias square (arg) return ${arg * arg}
 +   eval echo $square(5)
 +
 +will output
 +
 +   25
 +
 +======History======
 +The [[return]] command first appeared in EPIC4pre1.031.
 +
  
return.txt ยท Last modified: 2006/08/29 20:18 (external edit)