Post by buck huffmanPost by A***@NOT.AT.Arargh.comThat's fine for ONE module (source file)
I wrote a test program to verify your statement and you
are absolutely correct(I apologize for giving erroneous
information :( ). but in my research to write that test
program i ran across a vague remark in the reference manual
which states "The REDIM statement is often used in the
initial Form_Load event procedure to define the dimensions
of an array shared between modules."(page 337 under Redim
Statement - remarks). This statement comes with no further
explanations or examples leaving you to guess as to what it
means, in terms of actual implementation, on your own.
VBDOS 1.0 of VB 1.0? I don't remember any books for VBDOS. Oh, wait,
there they are, sitting on the shelf where I put them 10 or 15 years
ago. Three of them.
Anyway, I think that some of the rules may change for VBDOS. I have
never really used it. I only ever got it because it supposedly had
support for 386 instructions. But, that support was limited, it
doesn't have near strings, or protected mode . . . The IDE kinda
sucks, except that it does support the "_" (underline) char in
variable names, and the long line support is somewhat better.
I do use common shared dynamic arrays in PDS 7.1.
Part of an include file from a multi source file project:
...
COMMON SHARED LinkPtr()
REDIM SHARED LinkPtr(MaxKey)
...
The include file is in every source, however, the REDIM only gets
executed in the main module. (Works the same way in BCET)
There is no REM $STATIC or REM $DYNAMIC in the program.
"MaxKey" is a CONST, since I don't like 'magic' numbers.
Post by buck huffmanAlso in my research, I looked up my old code that I spoke
of before and found that I abandoned the attempt at using
global arrays and just shared the info through a temporary
file, what a miserable compromise :( . I am amazed that I
was able to find that code after all these years. Should
have deleted it long ago (hide the evidence, you know).
Anyway, I'm going to fiddle with the redim statement now
and I'll post here if it produces anything useful.
The other way is to stick everything in a large TYPE, DIM it once as
common shared, and just reference it. Assumming you have the memory.
--
ArarghMail603 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the garbage from the reply address.