BeginHeader and module variables

Hello,

I ran into an interesting problem regarding module variables.

Example 1) testmodule.lib

/*** BeginHeader tick /
extern uint32 tick;
/
** EndHeader */
uint32 tick;

Example 2) testmodule2.lib

/*** BeginHeader /
uint32 tick;
/
** EndHeader */

Example 3) testmodule3.lib
/*** BeginHeader /
extern uint32 tick;
/
** EndHeader */
uint32 tick;

Example 1 and 2 work. Since you seem to be required to enclose your module in #ifndef, #define, #endif conditional compiles, you shouldn’t get multiple variable declarations.

Example 3 does not work. Without the variable name in the BeginHeader line, it can not resolve the variable even though there is an external reference.

WHY?

From trial and error I have decided that for info to leave an file/module/library it must be between a BeginHeader and a EndHeader.

Note: If you #use an moduleA inside moduleB; where moduleB is used by moduleC.

For moduleC to see the info for moduleA it must either
use moduleA itself
or the #use of moduleA inside moduleB must have been between a BeginHeader and a EndHeader.

All of the above are guesses.

Tim S.