Qbasicnews.com

Full Version: Modules...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, so far my sprite editor is comming great and all, but I feel that I'm taking steps around problems that can easily be solved. It's all related to the modules (nathan, if you have the link to that module article, I could use it again...)

Basically, some subs and stuff are having problems carrying varibles over to the next module, so some variables are equal to zero, and I feel that I'm avoiding this the wrong way... can anyone help me out please?
Of course, my friend: http://faq.qbasicnews.com/?blast=PushingTheLimitsOfQb

and if you have problems, just ask Smile
Ok, I've made the *.bi file, but for some reason, one of the modules won't call up one of my functions that's also in the *.bi file...
Is the BI file '$included in the calling module?
Ack... if my brain keeps operating like this, I might be one of those people that die from burning their houses down with a stove...

Thanks...
Ok, thanks guys. Rather than start a new question though, I'll add this one to here...

Let's say I had one module and it contained something like...

Code:
DIM SHARED SCREEN(100,100,2) '<=== let's say that would actually work

Code:
DIM SHARED SCREEN2(100,100,2) '<=== let's say that would actually work

Ok, let's say that DIMing those two would normally cause OUT OF MEMORY errors... but only ONE of them wouldn't... Would splitting the two arrays in different modules still give me an OUT OF MEMORY?
Yeah, I guess. Splitting the code in modules is to help the compiler to be able to generate a big amount of code, so it only helps when the memory errors ame 'cause the code was too big for BC to compile it.

Also... those arrays are huge: 101x101x3x2 = 61,206 Bytes ... If you need several of those arrays you better think about handling XMS or EMS...
Nah I don't need those arrays, I just needed an example... thanks