|
|
|||||||
Currently AND, OR and NOT are boolean (returning 1 or 0),and & and | are bitwise. A bitwise 'Exclusive OR' would help in setting/clearing bitfields (used in file properties and Windows Dialog boxes etc) (Any suggestions on a symbol to represent it?) |
||||||||
|
|
|||||||
How about ^ Shawn. |
||||||||
|
|
|||||||
Excellent idea. If you need an X(n)OR function in the meantime, try this: $eCode=chr((asc($sCode) & $iEncrypt) | (255-(asc($sCode) | $iEncrypt))) if Z = A xor B then $eCode = $sCode xor $iEncrypt. cj [This message has been edited by cj (edited 01 May 2001).] |
||||||||
|
|
|||||||
If all you want to do is set and reset bits you don't need an XOR function, as the & and | perform those functions. XOR would be more suited to toggling bits. |
||||||||
|
|
|||||||
Is it me, or does cj's code return the inverse of the xor result? if $A = %1010 $B = %1100 then ===== $A xor $b = %0110 so I think the code should be: |
||||||||
|
|
|||||||
Post deleted by kholm |
||||||||
|
|
|||||||
AJH, it is not you, that is an XNOR function Thanks for the XOR version cj |
||||||||
|
|
|||||||
Well most of you guys seem to be more of programmers then Admins... Perhaps ones that have turned into LAN/WAN Administrators. Here is a link to another site that has some more information on this stuff that may help the rest of us to learn more. http://www.logicalexpressions.com/vbtip.htm ------------------ If you choose the quick and easy path, you will become an agent of evil. |
||||||||
|
|
|||||||
this is an old thread or actually topic but. in 4.50 your wishes came trough. long after the termination of your user account though... |