Standard Clarion for MEMBER
As we all know, the MEMBER statement of a module controls the scope that’s visible to the module.
MEMBER('MyGlobalModule')or
MEMBER('MyGlobalModule.clw')
are both standard clarion, and give access to the global scope
MEMBER or
MEMBER()
I call this an empty member
both are standard clarion and have no access to the global scope
but can be used by any program
classes are often written this way
Note: often you will want to add an empty map into a module with an empty member
MAP
END
as the empty map behaves like
MAP
INCLUDE('Builtins.clw')
END
which gives you access to commands you think of as part of the Run-Time Library (RTL)
The problem I’m solving
I have a special case, where I have code that operates on the same set of tables
but I’m not using DLLs (or LIBs).
I want shared code that appears in different programs, and I want that module to have access to it’s global scope. This only works because I also know that the things I’m accessing are present in the global scope of each program
my solution…
INCLUDE('member.inc')
notice there is a blank line above the include
for some reason this notation fails when it’s on the top line of the module
The next thing I do is alter my local .RED file of each of the projects to explicitly point to the member.inc file, for example the first line of my .RED reads
member.inc = E:\Dev\TSI\5\CW\OS3DE_Utils
the member.inc file, is simple
MEMBER('myGlobalModule.clw')