User`s manual

There are two forms of if statement:
Syntax of
if..then statement is:
if expression then
statements
end if
where expression returns a True or False value. If expression is True, then state-
ment is executed, otherwise it's not.
Syntax of
if..then..else statement is:
if expression then
statements1
else
statements2
end if
where expression returns a True or False value. If expression is True, then state-
ments1 are executed; otherwise statements2 are executed. Statements1 and state-
ments2 can be statements of any type.
Nested if statements require additional attention. General rule is that the nested
conditionals are parsed starting from the innermost conditional, with each else
bound to the nearest available if on its left.
if expression1 then
if expression2 then
statements1
else
statements2
end if
end if
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
90
mikroBASIC
MikroElektronika: Development tools - Books - Compilers
making it simple...
page
If Statement
Nested IF