Menu

#163 IfNot support for LogicLib

closed-accepted
Scripting (12)
5
2007-12-29
2007-12-08
Message
No

The ${Unless} statement can be very confusing for new users, especially because it can be combined with ${ElseIf} and ${EndIf}. It is a rather counter-intuitive term, and since it has been asked before (see forums) I suggest we include support for IfNot to LogicLib.nsh.

I have attached the v2.33 LogicLib.nsh, with the added IfNot defines and updated documentation. To make http://nsis.sourceforge.net/LogicLib match, use the following wiki code:

<highlight-nsis>If|IfNot|Unless..{ElseIf|ElseIfNot|ElseUnless}..[Else]..EndIf|EndUnless</highlight-nsis>
Conditionally executes a block of statements, depending on the value of an expression. IfNot and Unless are equivalent and interchangeable.

<highlight-nsis>AndIf|AndIfNot|AndUnless|OrIf|OrIfNot|OrUnless</highlight-nsis>
Adds any number of extra conditions to If, IfNot, Unless, ElseIf, ElseIfNot and ElseUnless statements.

Discussion

  • Message

    Message - 2007-12-08

    LogicLib header file from v2.33, with added IfNot support.

     
  • Amir Szekely

    Amir Szekely - 2007-12-08
    • assigned_to: nobody --> kichik
    • status: open --> closed-accepted
     
  • Amir Szekely

    Amir Szekely - 2007-12-08

    Logged In: YES
    user_id=584402
    Originator: NO

    Thanks, applied.

     
  • Message

    Message - 2007-12-28
    • status: closed-accepted --> open-accepted
     
  • Message

    Message - 2007-12-28

    LogicLib header file from v2.34, with clearer Usage comments.

     
  • Message

    Message - 2007-12-28

    Logged In: YES
    user_id=1955227
    Originator: YES

    I made a minor change to the Usage comments for clarity's sake: "IfNot and Unless are equivalent and interchangeable, as are ElseIfNot and ElseUnless."

    No other additions, I left the version number unchanged. New nsh attached.
    File Added: LogicLib.nsh

     
  • Amir Szekely

    Amir Szekely - 2007-12-29

    Logged In: YES
    user_id=584402
    Originator: NO

    Thanks.

     
  • Amir Szekely

    Amir Szekely - 2007-12-29
    • status: open-accepted --> closed-accepted
     

Log in to post a comment.