Search found 2 matches
- Mon May 04, 2015 1:59 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: COMMON SHARE an array?
- Replies: 3
- Views: 8555
Re: COMMON SHARE an array?
Thanks for the quick response! I think I'm getting it-- COMMON SHARED has to be included in both BAS files, and in the case of arrays, written out before DIM SHARED in the main module. This: 'file1.bas COMMON SHARED INV$() DIM SHARED INV$(20) 'file2.bas COMMON SHARED INV$() ...appears to be working ...
- Mon May 04, 2015 3:06 am
- Forum: QBASIC and QB64 Questions & Answers
- Topic: COMMON SHARE an array?
- Replies: 3
- Views: 8555
COMMON SHARE an array?
I've been working on a small game project for a year or two, in good ol QB45. Just recently I went over the 64kb limit and had to start dividing up my code into modules. Here's a rough summary of the problem: 'FILE1.BAS DIM SHARED INV$(20) DIM SHARED FLAG$(25) 'FILE2.BAS COMMON SHARED INV$() COMMON ...