2 1
2 2
2 3
3 1
3 2
3 3
4 1
4 2
4 3
You can nest a maximum of 4 loops within each other.
4.8.2 IF..ELSE..ENDIF structures
The IF statement and related ELSE and ENDIF statements are used to conditionally control
program flow.
Syntax:
IF <expression> <relational operator> <expression>
<Statements>
ELSE
<Statements>
ENDIF
Valid relational operators are:
Operator
Function
=
Equals
<
Less than
>
More than
The ELSE section and its statements is optional. There must always be an ENDIF statement.
For example:
LET A = 5
IF A > 3
PRINT A
ENDIF
Running this program prints the value of A (5) to the terminal, since when A > 3, the statement
“PRINT A” is executed. The following example extends this to use the ELSE statement too:
LET A = 1
IF A > 3
PRINT A
U4B operating manual Rev 1.00
34
Содержание U4B Ultimate4
Страница 54: ...U4B operating manual Rev 1 00 54...