I have created a piece of general code that I want to use with other programs. First of all I'm curious if there's any difference between linking a compiled unit and including an uncompiled unit...
Now I'm using some global variable in the unit, which should be accessible from the main program. I'm using the following method:
In the unit the variable are declared with:
In the main program (or include file) I use:
It seems that I can only use integer variables, since this causes an "Unresolved EXTERNAL" error 503 for CurrentMode.
I'm also wondering how to share a small array like this:
DIM Lmask(0 TO 3) AS SHARED BYTE
In other words, I'm not getting anywhere with EXTERNAL in units...
Could anyone tell me how to use it?
-------------
Sebastian Groeneveld
mailto:[email protected][email protected]</A>
Now I'm using some global variable in the unit, which should be accessible from the main program. I'm using the following method:
In the unit the variable are declared with:
Code:
EXTERNAL ScreenWidth, ScreenHeight EXTERNAL CurrentMode
Code:
DIM ScreenWidth AS SHARED INTEGER, ScreenHeight AS INTEGER DIM CurrentMode AS SHARED BYTE PUBLIC ScreenWidth, ScreenHeight PUBLIC CurrentMode $LINK "GENERAL.PBU"
I'm also wondering how to share a small array like this:
DIM Lmask(0 TO 3) AS SHARED BYTE
In other words, I'm not getting anywhere with EXTERNAL in units...
Could anyone tell me how to use it?
-------------
Sebastian Groeneveld
mailto:[email protected][email protected]</A>
Comment