next up previous contents index
Next: if, elif, else Up: Control Structures Previous: delete   Contents   Index


return [ expression]

If the return keyword is encountered in the main part of a script, execution of the script terminates at that point, and the value returned from any following expression is saved. This return value is available as a return from the Exec function, if that command was used to execute the script. In general, the return value is ignored.

If used in a function (see 18.10), the function returns immediately with the value of the expression, if given.

Stephen R. Whiteley 2017-04-09