Gosub

Description
Gosub jumps to a label with the intention of returning back to the jump point. You can also pass in argument as you do so, referencing each one as $1, $2, etc. These features provide a more powerful method of executing sections of script than with goto.

Goto does not clear the ability to return, however action goto does.

Syntax
gosub [arg1 arg2 ...]

Parameters

 * label
 * the name of the label to jump towards with an expectation of a return statement
 * arg1, arg2, ...
 * any number of arguments, referenced via $1, $2, ...

Examples
gosub sayhello world exit

sayhello: say hello $1 return