Denso RC5 Especificações Página 256

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 692
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 255
11-6
GOSUB (Statement) [Conforms to SLIM]
Function
Calls a subroutine.
Format
GOSUB <Label name>
Explanation
Calls a subroutine specified by the designated <Label name>.
Additional subroutines can be called from one subroutine (nested subroutines).
Related Terms
GOTO, RETURN
Example
DIM li1 As Integer
IF li1 = 0 THEN 'When li1 is 0.
STOP 'Stops program execution.
ELSEIF li1 = 1 THEN 'When li1 is 1.
GOTO *samp1 'Jumps to the label of *samp1.
GO TO *samp2 'Jumps to the label of *samp2.
ELSEIF li1 = 2 THEN 'When li1 is 2.
GOSUB *samp3 'Calls a subroutine with the label name*samp3.
ELSE 'When li1 is another value.
RETURN 'Returns to the program calling subroutine.
END IF 'Declares the end of the IF statement.
Notes
Use the RETURN statement to return the control from the subroutine called
with GOSUB (ON-GOSUB) to the program that called the subroutine.
Vista de página 255
1 2 ... 251 252 253 254 255 256 257 258 259 260 261 ... 691 692

Comentários a estes Manuais

Sem comentários