memory overflow comiling larg program - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: memory overflow comiling larg program (/thread-1630.html) |
memory overflow comiling larg program - A.Sadjadian - 07-30-2003 Dear Qbasicers Salaam Back in Feb.2003 I asked for help to tackel too long qbasic programs and received some advice that made compiling possible. Howver I now find that when I break a long program into 2 parts the second part does not recieve the arrays even though all dim statements are copied at its top. Could anybody help. I use qbasic 7.1 on vintage 486 computers to build control systems for the industry.(up to 384 I/O lines so far) Best Regards A.Sadjadian memory overflow comiling larg program - Plasma - 07-30-2003 Main module: Code: COMMON SomeArray() Other modules: Code: COMMON SomeArray() Make sure that you keep the COMMON statements in the same order in all the modules. Or you can use blocks (/something/). memory overflow comiling larg program - Antoni Gual - 07-31-2003 Check the FAQ http://faq.qbasicnews.com/?blast=ModularizeIt program memory overflow - A.Sadjadian - 07-31-2003 Dear Plasma 357 Thank you for the help. However the code you posted does not work as I get the message subscript out of range for the first array member used in a sub in the second (not main) module. There seems that DIM shared statements have to be in all moduls but that is not enough as then I do not get the above error but the array members can not be manipulate in moduls other than the main. I will be trying the solutions in ModularizeIt next. and will report the results. Thanks again A.Sadjadian memory overflow comiling larg program - Plasma - 07-31-2003 I had it backwards...should be COMMON SHARED and then DIM , not COMMON and DIM SHARED. (SHARED is not needed with DIM in this case, but if you use it nothing changes) Code: DECLARE SUB test1 () Code: DECLARE SUB test2 () memory overflow comiling larg program - TheBigBasicQ - 07-31-2003 http://faq.qbasicnews.com/?blast=PushingTheLimitsOfQb Try this. I think it is the link Antoni provided you with leads to the samething 8) |