galevsky
25th November 2007 19:12 UTC
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'
zootm
25th November 2007 19:24 UTC
I think you wanted to post in this forum.
ElChevelle
25th November 2007 19:52 UTC
Steal $1 and run
galevsky
25th November 2007 20:11 UTC
thanks to move it to the nsis forum.
kichik
25th November 2007 21:57 UTC
Nothing wrong. True AND False is always False. What were you trying to do?
galevsky
25th November 2007 22:38 UTC
?
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'
Wizou
26th November 2007 10:52 UTC
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
galevsky
26th November 2007 11:33 UTC
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'