📅  最后修改于: 2020-10-19 04:06:32             🧑  作者: Mango
决策使程序员可以控制脚本或其部分之一的执行流程。该执行由一个或多个条件语句控制。
以下是大多数编程语言中常见的典型决策结构的一般形式-
VBScript提供以下类型的决策声明。
Statement | Description |
---|---|
if statement | An if statement consists of a Boolean expression followed by one or more statements. |
if..else statement | An if else statement consists of a Boolean expression followed by one or more statements. If the condition is True, the statements under the If statements are executed. If the condition is false, then the Else part of the script is Executed |
if…elseif..else statement | An if statement followed by one or more ElseIf Statements, that consists of Boolean expressions and then followed by an optional else statement, which executes when all the condition becomes false. |
nested if statements | An if or elseif statement inside another if or elseif statement(s). |
switch statement | A switch statement allows a variable to be tested for equality against a list of values. |