Datasheet
DO STATEMENT
The do statement executes until the condition becomes true. The syntax of the do
statement is:
do
statements
loop until expression
statements
are executed repeatedly until expression evaluates true. expression
is evaluated after each iteration, so the loop will execute statements at least once.
Here is an example of calculating scalar product of two vectors, using the do statement:
s = 0
i = 0
do
s = s + a[i] * b[i]
i = i + 1
loop until i = n
JUMP STATEMENTS
A jump statement, when executed, transfers control unconditionally. There are five
such statements in mikroBasic PRO for AVR:
- break
- continue
- exit
- goto
- gosub
158
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroBasic PRO for AVR
CHAPTER 5