Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ideas on how to manage individual modules per client bas
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01283190
Message ID:
01283591
Vues:
16
>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
* etc

nInstalledModules = 0  &&Scope as ness.

*Allow ModuleA:
nInstalledModules = BITSET(nInstalledModules,ModuleA)
*Allow ModuleC:
nInstalledModules = BITSET(nInstalledModules,ModuleC)
* etc.

* Test for installed module
? IsInstalled(ModuleA)  && Returns .T.
? IsInstalled(ModuleB)  && Returns .F.

PROC IsInstalled
LParameter nModule
  RETURN BITTEST(nInstalledModules,nModule)
ENDPROC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform