Denso RC5 Especificaciones Pagina 266

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 692
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 265
11-16
WHILE-WEND (Statement)
Function
Executes a head decision iteration.
Format
WHILE [<Conditional expression>]
:
WEND
Explanation
This statement repeats statements between a WHILE statement and a WEND
statement while <Conditional expression> is satisfied.
If <Conditional expression> is ignored, it is regarded as true (except for 0) and
the loop is infinitely repeated.
If a statement branches into a WHILE statement and a WEND statement with a
GOTO statement, for example, it normally executes the WEND statement and
returns to the WHILE statement. The program is then executed normally so
that it enters this syntax.
There is also a DO WHILE-LOOP statement which serves the same function
as WHILE-WEND, but only DO WHILE-LOOP should be used.
Related Terms
DO-LOOP, REPEAT-UNTIL
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.
WHILE li2 < li9 'Executes a head decision iteration.
GOSUB *samp2
li9=li9+1
WEND 'Calls a GOSUB *samp2 statement until li2 < li9.
NEXT li7 'Repeats.
NEXT 'Repeats.
NEXT 'Repeats.
li9=0
REPEAT 'Executes a tail decision iteration.
GOSUB *samp2
li9=li9+1
UNTIL li9 < 5 'Calls a GOSUB *samp2 statement until li9 < 5.
LOOP 'Repeats.
Vista de pagina 265
1 2 ... 261 262 263 264 265 266 267 268 269 270 271 ... 691 692

Comentarios a estos manuales

Sin comentarios