Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



The GOSUB statement causes execution of a local subroutine, after which execution will continue with the next line of code.

GOSUB label

Where label refer to an existing label within the current source code.


The compiler does not check for the existence of a RETURN statement and if no RETURN statement is encountered the program will continue until the final statement and not return to the original GOSUB.

An example of use is as:

GOSUB Initialize ;* open files etc..
GOSUB Main ;* perform main program
GOSUB Finish ;* close files etc..
Initialize: * open files
Main: * main execution loop
Finish: * clean up after execution

Go back to jBASE BASIC.

Was this article helpful?