Mikroelektronika MIKROE-350 Fiche De Données
Also, you can group values together for a match. Simply separate the items by com-
mas:
mas:
select case reg
case 0
opmode = 0
case 1,2,3,4
opmode = 1
case 5,6,7
opmode = 2
end select
Nested Case Statements
Note that the
select case
statements can be nested –
values
are then assigned
to the innermost enclosing
select case
statement.
ITERATION STATEMENTS
Iteration statements let you loop a set of statements. There are three forms of iter-
ation statements in mikroBasic PRO for AVR:
ation statements in mikroBasic PRO for AVR:
- for
- while
- repeat
- while
- repeat
You can use the statements break and continue to control the flow of a loop state-
ment. break terminates the statement in which it occurs, while
ment. break terminates the statement in which it occurs, while
continue
begins exe-
cuting the next iteration of the sequence.
155
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroBasic PRO for AVR
CHAPTER 5