zoukankan      html  css  js  c++  java
  • NSIS逻辑函数头文件介绍

    !include "LogicLib.nsh"
    使用 NSIS 的宏来提供各种逻辑基本语句,不需要预先添加函数。
    • 基本语句

    If|Unless..{ElseIf|ElseUnless}..[Else]..EndIf|EndUnless
    - 有条件的执行一个语句区块,取决于表达式。

    AndIf|AndUnless|OrIf|OrUnless
    - 给 If、Unless、ElseIf 和 ElseUnless 增加额外的条件语句。

    IfThen..|..|
    - 有条件的执行一个内联语句,取决于表达式。

    IfCmd..||..|
    - 条件的执行一个内联语句,取决于 NSIS 函数提供的真值。

    Select..{Case[2|3|4|5]}..[CaseElse|Default]..EndSelect
    - 执行多个语句区块之一,取决于表达式的值。

    Switch..{Case|CaseElse|Default}..EndSwitch
    - 跳转到多个标记之一,取决于表达式的值。

    Do[While|Until]..{ExitDo|Continue|Break}..Loop[While|Until]
    - 重复一个语句区块直到停止 取决于表达式的值。

    While..{ExitWhile|Continue|Break}..EndWhile
    - DoWhile..Loop的别名(向后兼容)

    For[Each]..{ExitFor|Continue|Break}..Next
    - 重复语句区块来连续改变变量的值。

    • 表达式

    标准(内建的)字串判断(不区分大小写):
    a == b; a != b

    另外的不区分大小写的字串判断(使用 System.dll):
    a S< b; a S>= b; a S> b; a S<= b
    - 需要在 !include LogicLib.nsh 之前 !define LOGICLIB_STRCMP

    区分大小写字串判断(使用 System.dll):
    a S== b; a S!= b
    - 需要在 !include LogicLib.nsh 之前 !define LOGICLIB_STRCMP

    标准(内建的)有符号整数判断:
    a = b; a <> b; a < b; a >= b; a > b; a <= b

    标准(内建的)无符号整数判断:
    a U< b; a U>= b; a U> b; a U<= b

    64位整数判断(使用System.dll):
    a L= b; a L<> b; a L< b; a L>= b; a L> b; a L<= b
    - 需要在 !include LogicLib.nsh 之前 !define LOGICLIB_INT64CMP

    内建的NSIS标记判断:
    ${Abort};
    ${Errors};
    ${RebootFlag};
    ${Silent}

    内建的 NSIS 其它判断:
    ${FileExists} a;

    任何有条件的 NSIS 指令判断:
    ${Cmd} a;

    区段标记判断:
    ${SectionIsSelected} a;
    ${SectionIsSectionGroup} a;
    ${SectionIsSectionGroupEnd} a;
    ${SectionIsBold} a;
    ${SectionIsReadOnly} a;
    ${SectionIsExpanded} a;
    ${SectionIsPartiallySelected} a;

  • 相关阅读:
    51Nod1119
    stoi
    坑爹大质数
    USACO07OPEN Cheapest Palindrome
    USACO08NOV Mixed Up Cows
    USACO12FEB Nearby Cows
    SCOI2009 粉刷匠
    USACO16OPEN 248
    POI2014 PTA-Little Bird
    USACO17FEB Why Did the Cow Cross the Road I G
  • 原文地址:https://www.cnblogs.com/seer/p/3433434.html
Copyright © 2011-2022 走看看