Книга: Advanced PIC Microcontroller Projects in C

6.1.5 REPEAT-UNTIL

6.1.5 REPEAT-UNTIL

REPEAT-UNTIL is another control construct used in PDL codes. In the following example the program waits until a switch value is equal to 1.

Example:

REPEAT
 Turn on buzzer
 Read switch value
UNTIL switch = 1

Notice that the REPEAT-UNTIL loop is always executed at least once, and more than once if the condition at the end of the loop is not met.


Генерация: 0.930. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз