Top

Conditional control The

conditional statement requires the developer to specify whether to execute the specified statement by specifying one or more conditions, and test whether the condition is true, and execute another statement when the condition is false.

Z1h language provides the following Conditional judgment statement:

statement description
if statement if statement consists of a Boolean expression followed by one or more statements.
If … else statement if statement can be used Optional else statement, the expression in the else statement is executed when the boolean expression is false.
If nested statement You can embed one or more if or else if statements in the if or else if statement.
Switch statement switch Statements are used to perform different actions based on different conditions.