[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...
  • 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.


last edited (December 9, 2002) by KDivad Leahcim, Number of views: 1848, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.