Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

Gosub

Action: Causes script execution to continue at the first statement after a label.
 
Syntax: GOSUB <label>
 
Remarks:

Label can be an expression.
When a RETURN statement is encountered, script execution continues at the statement following the GOSUB statement.
 

See Also: :, Goto, Return
 
Example:

? "This demonstrates calling a subroutine"
GOSUB "Demo"
? "End of demonstration…"
EXIT 1
 
:Demo
? "We are in the subroutine now…"
RETURN