Skip to main content
Version: v6.5.0

Else

Command Description

It needs to be used in combination with the "If condition is true" (If) statement. When the previous condition is not true, the following block of statements is executed; if the previous condition is true, the following block of statements is skipped.

Command Prototype

Else 


Parameter Description

ParameterRequiredTypeDefaultDescription
NoneNoneNoneNoneNone
TracePrint("--------------------------------------Conditional branch--------- ----------------------------------") 
//-------------------------------------------------------------------------------
//[Remarks] If the expression expression is true, execute the Yes Block block, otherwise execute the No Block block. ElseIf statements can appear multiple times, corresponding to more conditional branches. ElseIf and Else statements can be omitted if they are not needed, and the corresponding statement blocks do not need to be written.
TracePrint("Let the variable a be UiBot, the conditional branch judges whether a is equal to UiBot, if it is, print yes, otherwise print no as: ")
a = "UiBot"
If a = "UiBot"
TracePrint "yes"
Else
TracePrint "no"
End If