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

KiXtart Command Reference

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.

examples

? "This demonstrates calling a subroutine"

GOSUB "Demo"

? "End of demonstration…"

EXIT 1

:Demo

? "We are in the subroutine now…"

RETURN