Hello:

Is anybody using Witango for something like the following?

http://www.johnsample.com/articles/BitwiseEnums.aspx

In general, I want to test for the following in Witango using the above
referenced bitwise operator logic:

<@ASSIGN NAME="PermissionForTaskA" value="1">

<@ASSIGN NAME="ThisClientsPermissions" value="33">

Does this client have permission to do Task A?  In this case, Yes is the
answer.

 

<@ASSIGN NAME="PermissionForTaskB" value="2">

<@ASSIGN NAME="ThisClientsPermissions" value="33">

Does this client have permission to do Task B?  In this case, No is the
answer.

 

For example, if you had an integer column called ThisClientsPermissions with
a value of 33, you could use the following statement to return the row if it
has  PermissionForTaskA (1) 

select row from table where (PermissionForTaskA & 1 > 0) 

Can the calc metatag assist with this type of logic?

Thank you in advance for any assistance/insight.

John Hotaling

AuctionAnything.com, Inc.



 


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to