3.4.1 Single-Line if
Description
The form of a single-line if statement is as follows: If <Boolean expression> is true, branching to <address> will occur. If false, moving to the next statement will occur.
Syntax
Example
Below is an example of the single-line if statement. If the condition that pressure is greater than the limit is true, branching to the label address “*err will occur,” making it possible to print a warning that the pressure is too high. If the condition is false, the next statement will be executed one after the other without branching, so “In normal operation ” will be printed, ending the program.
Last updated
Was this helpful?