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 GOTO statement causes program execution to jump to the code at a specified label.

GO{TO} label{:}

Where label refers to an existing location within the current source code. The location must be the same name as the label.

Labels can be numeric or alphanumeric but alphanumeric labels must be terminated with a colon. Numeric labels can be terminated with a colon but it is not mandatory. The use of the colon in the GOTO statement is optional.


Using the GOTO command obscures the readability of the code and may be a hindrance to maintainability. All programs written using the GOTO construct can be written using structured statements such as LOOP and FOR. There are various opinions on this issue but the consensus is, avoid GOTO.

One possibly acceptable use of the GOTO statement is to transfer execution to an error handler upon detection of a fatal error that will cause the program to terminate as follows:  

GOTO Exception;* jump to the exception handler
Exception:* exception handler

Go back to jBASE BASIC.

Was this article helpful?