Metrologic IS1000 Series Guía de usuario Pagina 26

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 198
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 25
20
CipherLab BASIC Compiler
User's Guide
...
GOTO Label2
...
Label2: PRINT "This is a character string label."
4.6 Subroutines
A subroutine is a set of instructions given a particular name or a line label. Users can
simplify their programming by breaking programs into smaller logical subroutines. A
subroutine will be executed when being called by a GOSUB command. For example,
ON KEY(1)GOSUB KeyF1
...
KeyF1:
PRINT "F1 is pressed."
RETURN
The command RETURN marks the end of the subroutine and tells the processor to return to
the caller. A subroutine has to be appended at the end of the main BASIC program.
A subroutine can be defined with or without a pair of brackets. For example,
SUB Subroutine1( )
...
PRINT "Subroutine1 is executed."
END SUB
...
SUB Subroutine2
...
PRINT "Subroutine2 is executed."
END SUB
Vista de pagina 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 197 198

Comentarios a estos manuales

Sin comentarios