Subj : Re: User Object USER_DELETED
To : Mortifis
From : echicken
Date : Tue Jul 23 2019 10:04 pm
Re: Re: User Object USER_DELETED
By: Mortifis to echicken on Tue Jul 23 2019 22:40:15
Mo> as learning any language ( obviously I am not C adept) what does ~& or
Mo> even just ~ mean negate a bitwise?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators
'~a' inverts the bits of 'a'
'a & b' returns ones in positions where both 'a' and 'b' have ones
'a & ~b' returns ones in positions where both 'a' and the inverse of 'b' have ones
'a &= b' assigns the result of 'a & b' to 'a'
'a &= ~b' assigns the result of 'a & ~b' to 'a'
'a | b' returns ones where either 'a' or 'b' have ones
'a |= b' assigns the result of 'a | b' to 'a'
So:
var a = 1; // 00000001
var b = 2; // 00000010
a |= b; // a = 00000001 | 00000010
a &= ~b; // a = 00000011 & 11111101
if that makes sense.
---
echicken
electronic chicken bbs - bbs.electronicchicken.com
� Synchronet � electronic chicken bbs - bbs.electronicchicken.com