116
Compiler
© 2008 Conrad Electronic
5.3.6
Control Structures
Control structures allow to change the program completion depending on expressions, variables or
external influences.
5.3.6.1
Do Loop While
With a Do ... Loop While construct the instructions can depending on a condition be repeated in a
loop:
Do
Instructions
Loop While Expression
The instructions are being executed. At the end the Expression is evaluated. If the result is unequal
0 then the execution of the expression will be repeated. The entire procedure will constantly be
repeated until the Expression takes on the value 0.
Examples:
Do
a=a+
2
Loop While a<
10
Do
a=a*
2
x=a
Loop While a
The essential difference between the Do Loop While loop and the normal Do While loop is the
fact that in a Do Loop While loop the instruction is executed at least once.
Exit Instruction
An Exit instruction will leave the loop and the program execution starts with the next instruction after
the Do Loop While loop.
Example:
Do
a=a+
1
If a>
10
Then
Exit
' Will terminate loop
End If
Loop While
1
' Endless loop
Содержание C-Control Pro Mega Series
Страница 1: ... 2008 Conrad Electronic C Control Pro Mega Series ...
Страница 9: ...VIII Inhalt 2008 Conrad Electronic ...
Страница 10: ...Part 1 ...
Страница 17: ...Part 2 ...
Страница 23: ...Part 3 ...
Страница 41: ...32 Hardware 2008 Conrad Electronic 3 3 5 3 Component Parts Plan ...
Страница 57: ...48 Hardware 2008 Conrad Electronic 3 4 5 3 Component Parts Plan ...
Страница 58: ...Part 4 ...
Страница 91: ...82 IDE 2008 Conrad Electronic ...
Страница 92: ...Part 5 ...
Страница 135: ...126 Compiler 2008 Conrad Electronic 31 1F US 63 3F 95 5F _ 127 7F DEL ...
Страница 136: ...Part 6 ...
Страница 231: ...Part 7 ...
Страница 240: ......