>Hi Viv
>
>>What's the maximum number of modules that you are anticipating?
>
>I will keep on adding modules (based on other responses probably I have not used the right word for this, a sale bill data-entry and sale register for me are both different modules) as required.
>
>>IAC the best you can do (size-wise) is to use 1 bit per module rather than 1 character. A double has 64 bits (but, IIRC, only 52 are usable)
>
>I was fiddling with BITTEST() (never was able to use BITSET()), what if I use a hex value can I get more options in? Like I mentioned I already have a provision in my application for a code of 10 characters maybe I could macro (0h&codefld) to get the hex value and then BITTEST()
>
>Please advise.
Hex adds nothing - it just a different way of writing/visualizing a number.
You could try something like:
#DEFINE ModuleA 1
#DEFINE ModuleB 2
#DEFINE ModuleC 3
nInstalledModules = 0
nInstalledModules = BITSET(nInstalledModules,ModuleA)
nInstalledModules = BITSET(nInstalledModules,ModuleC)
? IsInstalled(ModuleA)
? IsInstalled(ModuleB)
PROC IsInstalled
LParameter nModule
RETURN BITTEST(nInstalledModules,nModule)
ENDPROC