Qbasicnews.com

Full Version: BC: Out of Memory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
When I compile my program, I get a "BC: Out of Memory" error, and then it says:

Quote:45042 Bytes Available
0 Bytes free

0 Warning Errors
2 Severe Errors

What can I do to make my program compile correctly? Increase memory for Qbasic? How?

Thanks for any help.
I'm thinking that the message you really got was "Program memory overflow." Either way, you need to break your program up into separate modules.
The error message was not program memory overflow, it was, like I said, BC: Out of Memory, that is, when I compiled the program.

I have my program split into subs, if that is what you mean.
Nope. It means split into modules. Several smaller BAS files which compile to several OBJs which are linked to yer big EXE. Check... http://faq.qbasicnews.com/?blast=PushingTheLimitsOfQb and you'll find some hints.
Thanks, I'll read that and see what I come up with. Big Grin
If you read the whole Nathan's tut you will know more QB than most of us. Big Grin
It covers modularizing, EMS , DYNAMIC arrays... :o It should be a complete online book.

If you want a quick guide to modularizing read this http://www.tek-tips.com/faqs.cfm?spid=314&sfid=3186. Not 100% accurate...
This might not be of much use but you would need to use COMMON SHARED to share variables among the modules unlike the DIM SHARED. Look it up in QB's help. I don't know whether nathan's tut covers it.
he *has* to use COMMON SHARED. (DIM SHARED won't work across modules.) But if everything's in one file, it shouldn't make a difference.
Quote:he *has* to use COMMON SHARED. (DIM SHARED won't work across modules.) But if everything's in one file, it shouldn't make a difference.

Ahem, I think I mentioned *clearly* "unlike DIM SHARED". That should cover the difference between COMMON SHARED and DIM SHARED 8)
.
Pages: 1 2 3