Denso RC5 Dokumentacja Strona 263

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 692
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 262
Chapter 11 Flow Control Statements
11-13
Example
DEFINT li1, li2, li3, li4, li5, li6, li7, li8, li9
DO WHILE li1 > li2 'Executes a head decision iteration.
IF li1 = 4 THEN EXIT DO 'Exits from DO-LOOP if li1 = 4.
FORli3=0TO5 'Repeats the process of FOR-NEXT 5 times.
FOR li4 = li5 TO li6
'Repeats the process of FOR-NEXT by adding 1 to the
'value of li5 every time the repetition is done until
'li5 becomes the value of li6.
FORli7=1TOli8STEP 2 '
Repeats the process of FOR-NEXT by adding 2 to the value
'
every time the repetition is done from 1 until it becomes li8.
IF li2 = 2 THEN EXIT FOR 'Exits from FOR-NEXT if li2 < 0.
DO WHILE li2 < li9 'Executes a head decision iteration.
GOSUB *samp2
li9=li9+1
LOOP 'Calls a GOSUB *samp2 statement until li2 < li9.
NEXT li7 'Repeats.
NEXT 'Repeats.
NEXT 'Repeats.
li9=0
DO 'Executes a tail decision iteration.
GOSUB *samp2
li9=li9+1
LOOP UNTIL li9 < 5 'Calls a GOSUB *samp2 statement until li9 < 5.
LOOP 'Repeats.
Przeglądanie stron 262
1 2 ... 258 259 260 261 262 263 264 265 266 267 268 ... 691 692

Komentarze do niniejszej Instrukcji

Brak uwag