Metrologic IS1000 Series Guía de usuario Pagina 36

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 198
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 35
30
CipherLab BASIC Compiler
User's Guide
Example
PRINT "Input a number (1-9):"
INPUT Num%
CLS
ON Num% GOTO 100, 100, 200, 200, 300, 400, 400, 400
...
100
PRINT "Number 1-3 is input."
GOTO 500
200
PRINT "Number 4-5 is input."
GOTO 500
300
PRINT "6 is input."
GOTO 500
400
PRINT "Number 7-9 is input."
500
...
5.3 Commands for Looping Structures
Looping structures repeat a block of statements, either for a specified number of times or
until a certain condition is matched. In BASIC, two kinds of looping structures,
FOR...NEXT and WHILE...WEND can be used. Command EXIT can be used as an
alternative to exit from both FOR...NEXT and WHILE...WEND loops.
Both FOR...NEXT and WHILE...WEND statements can be nested up to 10 levels.
EXIT
Purpose
To provide an alternative exit for looping structures, such as FOR...NEXT and
WHILE...WEND statements.
Syntax
EXIT
Remarks
EXIT can appear anywhere within the loop statement.
Vista de pagina 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 197 198

Comentarios a estos manuales

Sin comentarios