On ... Gosub

On index Gosub LINE { , LINE ... }

If index is zero execution drops down to the next line without calling any subroutines.

If index > 0 then the corresponding subroutine will be called from the list of labels following the Gosub. The first label is called if index equals one.

The Gosub command can only be used to transfer control to a line label type subroutine. It can not be used to call the new Sub type subroutines.

This type of subroutine is provided for compatibility with older Basic programs. All new programs should use the new Subroutine/Function syntax.


Become a Patron