Denso Power Net Terminal BHT-103 Specifiche Pagina 220

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 577
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 219
Chapter 14. Statement Reference
212
Syntax:
FOR controlvariable = initialvalue TO finalvalue [STEP
increment]
.
.
.
NEXT [controlvariable]
Parameter:
controlvariable
A non-array numeric variable.
initialvalue, finalvalue, and increment
Numeric expressions.
Description:
FORNEXT defines a loop containing statements (which is called "body of a loop")
to be executed by the number of repetitions controlled by initialvalue,
finalvalue, and increment.
Processing procedures
(1) The Interpreter assigns initialvalue to controlvariable.
(2) The Interpreter checks terminating condition; that is, it compares the value of
controlvariable against the finalvalue.
- When the value of increment is positive:
If the value of controlvariable is equal to or less than the final-
value
, go to step (3). If it becomes greater the finalvalue, the program
proceeds with the first line after the NEXT statement (the loop is over).
- When the value of increment is negative:
If the value of
controlvariable is equal to or greater than the final-
value
, go to step (3). If it becomes less than the finalvalue, the pro-
gram proceeds with the first line after the NEXT statement (the loop is over).
(3) The body of the loop executes and the
NEXT statement increases the value of
controlvariable by the value of increment. Then, control returns to
the
FOR statement at the top of the loop. Go back to step (2).
Flow control statement
FOR...NEXT
Defines a loop containing statements to be executed a specified number of times.
Vedere la pagina 219
1 2 ... 215 216 217 218 219 220 221 222 223 224 225 ... 576 577

Commenti su questo manuale

Nessun commento