Argox PA-20 Basic Programming Manual Instrukcja Użytkownika Strona 20

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 143
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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.
Przeglądanie stron 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 142 143

Komentarze do niniejszej Instrukcji

Brak uwag