Thank you Anthony.
Of course, I keep forgetting that Witango does server side JS. That makes
it very easy:
<@ASSIGN NAME="PermissionForTaskA" value="8" scope="request">
<@ASSIGN NAME="ThisClientsPermissions" value="33" scope="request">
<@SCRIPT EXPR="
var task = server.getVariable('PermissionForTaskA', 'request');
var clientperms = server.getVariable('ThisClientsPermissions', 'request');
(clientperms & task) > 0;
" SCOPE="request">
Returns False
<@ASSIGN NAME="PermissionForTaskA" value="32" scope="request">
<@ASSIGN NAME="ThisClientsPermissions" value="33" scope="request">
<@SCRIPT EXPR="
var task = server.getVariable('PermissionForTaskA', 'request');
var clientperms = server.getVariable('ThisClientsPermissions', 'request');
(clientperms & task) > 0;
" SCOPE="request">
Returns True
I greatly appreciate the input from everyone.
Thank you.
John
==============================================================
John Hotaling
<http://www.AuctionAnything.com> www.AuctionAnything.com
AuctionAnything.com, Inc.
==============================================================
_____
From: Anthony Humphreys [mailto:[email protected]]
Sent: Friday, July 03, 2009 11:45 PM
To: [email protected]
Subject: [Spam] Re: Witango-Talk: Bitwise Operators and Enumeration
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 = !
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf