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?



Defines the maximum number of GOSUB levels that can be attained.


513 through 10000 inclusive


The default is 512, which will suit most applications.


Must be set before starting a jBASE process.


To set the GOSUBĀ stack depth to 1k:

set GOSUBSTACKDEPTH=1024       [Windows]


A setting less than 513 or greater than 10000 will default to 512 levels.

If it is not set, or is set to a non-numeric value, then jBASE uses the default of 512 levels.

If the defined stack depth is exceeded then jBASE will drop to the debugger with this error message:

 ** Error [ STACK_FULL ] **
Internal GOSUB stack FULL , Line     2 , Source gosub_test.b
Trap from an error message, error message name = STACK_FULL
Line 2 , Source gosub_test.b
jBASE debugger->

Effective release: jBASE

Was this article helpful?