Default Stack Size for QuickBasic Versions 3.00 and 4.00 (31037)






This article was previously published under Q31037

SUMMARY

In QuickBasic Version 3.00, the default stack size is 768 bytes. In QuickBasic Versions 4.00, 4.00b, and 4.50 for MS-DOS and the Basic compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2, the default stack size is 2K (2048 bytes).

You can increase the stack size by using the CLEAR statement. However, the CLEAR statement should be used with caution. For additional information regarding the CLEAR statement, please refer to the Basic language reference manual.

You can also use the LINK /STACK option to change the stack size in QuickBasic Version 4.00, the Basic compiler Version 6.00, and later versions. The LINK /STACK option does not affect available stack size in QuickBasic Version 3.00 programs.

In QuickBasic 4.x and the Basic compiler 6.00, PRINT FRE(-2) displays a size much smaller than 2K (e.g. 1000 to 1600 bytes) because a program uses the stack when it is running. The FRE(-2) function to report unused stack space is not available in QuickBasic Version 3.00 or earlier versions.

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB31037