Archive: a AND NOT(b)


a AND NOT(b)
Hi,

How to run $1 AND NOT($0) ?


Messagebox MB_OK "a ? $0 b ? $1"
IntOp $1 $1 && !$0
MessageBox MB_OK "Result: $1"


At runtime:

a ? 0 b ? 1
Result: 0

I think there is something wrong with twice usage of int operators(&& and !) in the same line, but how can I get it working ?

Thank you.


Gal'

I think you wanted to post in this forum.


Steal $1 and run


thanks to move it to the nsis forum.


Nothing wrong. True AND False is always False. What were you trying to do?


?

At runtime....

$0 = 0
$1 = 1

then... $1 && !$0

and 1 && (!0) .... equals 1 && 1 ....

I would like to do a NOT($0)... I thought I could use '!' operator (like in other languages).

Gal'


IntOp is one operation at a time
so I guess you want :


; first, "logic not" the content of $0
IntOp $0 $0 !
IntOp $1 $1 && $0

Yes, I was wondering about how to use operator ! (only one argument) and thought that IntOp $0 $0 ! would ask for a second argument.

Thks.

Gal'