Argox PA-20 Basic Programming Manual Uživatelský manuál Strana 13

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 143
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 12
PT-Basic Programming Manual Ver. 1.00 12/143
For example:
GOTO 100
…
100
…
GOTO LABEL2
…
LABEL2:
…
2.6 Subroutines
A subroutine is a set of instructions with a particular name or a line label.
User can simplify their programming by breaking programs into
subroutines. A subroutine will be executed when being called by a
GOSUB command.
For example:
ON COM (1) GOSUB ReadCOM
…
ReadCOM:
…
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:
GOSUB FUN
GOSUB Place
GOSUB Test
END
…
SUB FUN( )
PRINT "Run function!!"
END SUB
Zobrazit stránku 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 142 143

Komentáře k této Příručce

Žádné komentáře