[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
QbasicFAQ_LargePrograms
Back to QBasic FAQ Main Page.
Unlike older versions of Basic, QBasic already allows for code that is larger than 64K, but main module level code is restricted to 75K.
Over 75K? If you take full advantage of QBasic's Defined SUB and FUNCTIONs you can jam a whole lot more code into your programs. According to the documentation, QB will support up to 125K of code total, with the main module, limited to 75K.
Note: If you choose to compile your program, it is recommended that you do not exceed the 64K point, just for compatibility's sake.
Even larger? Extremely large programs (over the 125K size), will require one of several options...
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
QbasicFAQ_LargePrograms
Back to QBasic FAQ Main Page.
Unlike older versions of Basic, QBasic already allows for code that is larger than 64K, but main module level code is restricted to 75K.
Over 75K? If you take full advantage of QBasic's Defined SUB and FUNCTIONs you can jam a whole lot more code into your programs. According to the documentation, QB will support up to 125K of code total, with the main module, limited to 75K.
Note: If you choose to compile your program, it is recommended that you do not exceed the 64K point, just for compatibility's sake.
Even larger? Extremely large programs (over the 125K size), will require one of several options...
- Go through your code and rewrite any unnecessarily "wordy" code to reduce it's size. (You may have to remove all those comments a good programmer adds.)
- Optimize your code, and use and to reuse GOSUBs, SUBs, and FUNCTIONS.
- Break up the code... Into "acts" if it's a game, or into separate program functions, or into ?modules.
- Move internal DATA to a data file that can be read as needed.
- Convert functions to compiled external SHELL calls.
- Lastly, you can upgrade the code to QuickBASIC 4.5 and move some to a library, and then compile the complete program.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
