CLEAN
ENCORE
ENCORE3
PAUSE
GO
|
v
*
* * FALSE
* e? *----->|
* * !
* !
| TRUE !
v !
------------- !
| statement | !
------------- !
| !
|<-----------|
!
v
if (e?) statement
The if statement
evaluates the expression e.
If the expression is TRUE or
NON-ZERO the statement will
be executed.
If the expression is FALSE or ZERO
The "if" statement will be exited.
|
v
*
FALSE * * TRUE
|<----- * e? *----->|
| * * !
| * !
v v
------------- -------------
| statement2 | | statement1 |
------------- -------------
| |
| |
|------------> <-----------|
!
v
if(e?) statement1 else statement2
The if - else statement
evaluates the expression e.
If the expression is TRUE or
NON-ZERO statement1 will
be executed.
If the expression is FALSE or
ZERO statement2 will be
executed.