4-2 If...else 语句

作者: 妹妹好想你 | 来源:发表于2017-10-25 11:32 被阅读0次

if(表达式)
指定在表达式,计算结果为 TRUE 时执行的命令.

if (A_Index > 100 or Done)
    return

if (A_TickCount - StartTime > 2*MaxTime + 100)
{
    MsgBox Too much time has passed.
    ExitApp
}

if (Color = "Blue" or Color = "White")
{
    MsgBox The color is one of the allowed values.
    ExitApp
}
else if (Color = "Silver")
{
    MsgBox Silver is not an allowed color.
    return
}
else
{
    MsgBox This color is not recognized.
    ExitApp
}

相关文章

  • 4-2 If...else 语句

    if(表达式)指定在表达式,计算结果为 TRUE 时执行的命令.

  • Swift 条件语句

    if 语句 if...else 语句 if...else if...else 语句 switch 语句 这里我们需...

  • Java 语句结构

    条件语句 单if语句: if...else语句 if...else if...else 语句if 语句后面可以跟 ...

  • typescript笔记(三)

    一、条件语句:if语句、if...else语句、if...else if...else语句、switch语句; 1...

  • 【二】条件与循环语句

    条件与循环语句 if语句 if...else if...else if...else switch语句 例如: 判...

  • 每天总结三

    条件语句if if...else if...else if...else 循环语句for for..in while

  • Flutter(四)Dart语言基础-控制语句

    本文主要学习Dart 中控制语句 if 语句 if 语句 if...else if 语句 if...else if...

  • 程序逻辑

    一、顺序结构 (一)if语句 if语句用于实现条件分支结构 (二)if...else语句 if...else语句是...

  • sql server 流程控制语句

    流程控制语句:begin...end、if、if...else、if...else if...else if......

  • 4.程序控制语句

    IF...ELSE 语句 简介   Scala IF...ELSE 语句是通过一条或多条语句的执行结果(True或...

网友评论

    本文标题:4-2 If...else 语句

    本文链接:https://www.haomeiwen.com/subject/dacqpxtx.html