Argox PA-20 Basic Programming Manual Manual do Utilizador Página 20

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 143
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 19
PT-Basic Programming Manual Ver. 1.00 19/143
ON GOSUB
Purpose
To call one of the specified subroutines depending on the
value of the expression.
Syntax
ON N% GOSUB SubLabel| SubName {,SubLabel|
SubName}
Example
D% = DAY_OF_WEEK
ON D% GOSUB MON, THE, WED, THR, FRI, SAT, SUN
WHILE INKEY$=""
WEND
END
MON:
PRINT "MONDAY"
RETURN
THE:
PRINT "TUESDAY"
RETURN
WED:
PRINT "WEDNESDAY"
RETURN
THR:
PRINT "THURSDAY"
RETURN
FRI:
PRINT "FRIDAY"
RETURN
SAT:
PRINT "SATURDAY"
RETURN
SUN:
PRINT "SUNDAY"
RETURN
Description
N% is a numeric expression that is rounded to an integer. The
value of N% determines which subroutine is to be called. If
the value of N% is 0 or greater than the number of routines
listed, the interpreter will continue with the next executable
statement.
SubLabel is the name of a subroutine.
Vista de página 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 142 143

Comentários a estes Manuais

Sem comentários