GOSUB

From STX Wiki
Jump to navigationJump to search
GOSUB subrlabel [arguments]

Call the local subroutine at subrlabel label. Calling a local subroutine is like starting a new macro, but the execution begins at the label subrlabel and not with the first line of the macro code. The subroutine will get an own execution environment and an own local variable space. Use the command EXIT to end the subroutine and to return a result to the caller.

Note: The command GOSUBX works like this command, but the called subroutine uses the same local variable environment as the caller.

See also: GOTO, DISPATCH, MACRO

Navigation menu

Personal tools