JavaScript does this kind of thing with ease, and it's easy enough to incorporate ServerSide JavaScript in Witango. Use the Bit operators: Bit AND = & Bit OR = | Bit XOR = ^ vs Logical AND = && Logical OR = || Logical NOT = !
On 7/3/09, John Hotaling <[email protected]> wrote: > > 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 ThisClientsPermissionswith 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 > > ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
