>Hi Len,
>
>>I do a similar thing in one of my apps., but use '0' & '1' (rather than chr(0) & chr(1)) - that way we have a readable binary string - any reason you couldn't do the same & check for substr( fieldname, bitno, 1 ) = '1' ?
>
>Part of my problem is that I'm modifying an existing system - each character in the string represents a module in the application.
>
I perhaps didn't explain that very well. Each character represents a module.
For each module, I extract the relevant character from the string and take the ascii value of that character. I can then use bittest on that number to see which bits are set for that module e.g. 0 has no bits set, 1 has one bit set, 3 has 2 bits set etc. Each bit represents a particular user right in that module.
Best.
Matt.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement