Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem storing chr(0) in character field
Message
De
06/03/2001 07:21:49
 
 
À
06/03/2001 07:16:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00481876
Message ID:
00482165
Vues:
13
>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
Fil
Voir

Click here to load this message in the networking platform