Hellow !
Please I need help because I don't know how to do a boolean comparison in a !if.
In C code I do it like this:
if ((a == b) || (b == c) || (c == d) || (d == e))
But in Nsis I really don"t know how to do this, I read the doc but... 0_o
I've tried everything in my code but it's don't work.
Please heeeeelp ! =)
Thanks !
boolean comparison
14 posts
Yep I have include it but... 0_o
Are you doing run time or compile time comparisons?
Stu
Stu
I think it's runtime comparisons.
I explain you, the comparison is done according to the settings in a customized window
I explain you, the comparison is done according to the settings in a customized window
All the LogicLib syntax is explained in the header file itself (Include\LogicLib.nsh).
${If} ...
${OrIf} ...
...
${EndIf}
Stu
${If} ...
${OrIf} ...
...
${EndIf}
Stu
=) =) =) (I said that's runtime ! =( snif...)
ok I will read the header file.
I'll be back after eating and reading the file 🙂
Thanks !
ok I will read the header file.
I'll be back after eating and reading the file 🙂
Thanks !
LogicLib is used for runtime functionality: The commands are evaluated when the installer is being run (so, at runtime). The LogicLib defines however are of course evaluated at compiletime (when the installer is being compiled), just like all other defines are evaluated at compiletime.Originally Posted by Noude View Post=) =) =) (I said that's runtime ! =( snif...)
So while the ${defines} of LogicLib are compiletime magic, the actual functionality deals with runtime. Otherwise, you could never do this:
${If} $Variable == "test"
...because, $Variable is only given a value at runtime. The compiler won't have a clue what its value will end up being, so it cannot be a compiletime command.
Reeee !
So I have to use the LogicLib but how can I do with my variables ? 0_o
I have to compare variables at a moment !
So I have to use the LogicLib but how can I do with my variables ? 0_o
I have to compare variables at a moment !
I just read the LogicLib.nsh and .nsi
But there're just examples to do if a <= b or if a != b...
No example with || or && :/
Really I don't know how to do ...
But there're just examples to do if a <= b or if a != b...
No example with || or && :/
Really I don't know how to do ...
if ((a == b) || (b == c) || (c == d) || (d == e))
${If} $a == $b
${OrIf} $b == $c
${OrIf} $c == $d
etc
etc
How can that be too difficult? o_O
${If} $a == $b
${OrIf} $b == $c
${OrIf} $c == $d
etc
etc
How can that be too difficult? o_O
because I do not always understand how to do with compiltimne and runtime... arf, sorry.
Yes, it's not difficult at all but... 0_o
Thank you a lot ^^
Yes, it's not difficult at all but... 0_o
Thank you a lot ^^
But I can't do :
${If} ((toto == Yes) && (toto == No) && (toto == No) && (toto == No)&& (toto == No))
???
I can only give 4 parameters to the ${If} ??
because if I do:
${If} $a == $b
${OrIf} $b == $c
${OrIf} $c == $d
I'm dead :/
${If} ((toto == Yes) && (toto == No) && (toto == No) && (toto == No)&& (toto == No))
???
I can only give 4 parameters to the ${If} ??
because if I do:
${If} $a == $b
${OrIf} $b == $c
${OrIf} $c == $d
I'm dead :/
It is quite easy.Originally Posted by Noude View Postbecause I do not always understand how to do with compiltimne and runtime...
Everything starting with a "!" is compiletime and
everything starting with "$" is runtime.
BTW: You should have a look at the helpfile (NSIS.chm) in your ${NSISDIR}.
Gunther
Yep I've just read it 2 seconds ago =) thanks 🙂