Posts: 43
Threads: 13
Joined: Nov 2002
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.
Posts: 704
Threads: 0
Joined: Dec 2002
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.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 43
Threads: 13
Joined: Nov 2002
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.
Posts: 6,419
Threads: 74
Joined: Mar 2002
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.
Posts: 43
Threads: 13
Joined: Nov 2002
Thanks, I'll read that and see what I come up with.
Posts: 1,407
Threads: 117
Joined: Dec 2002
If you read the whole Nathan's tut you will know more QB than most of us.
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...
Antoni
Posts: 4,307
Threads: 63
Joined: May 2003
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.
Posts: 704
Threads: 0
Joined: Dec 2002
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.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 4,307
Threads: 63
Joined: May 2003
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)
Posts: 704
Threads: 0
Joined: Dec 2002
.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.