Denso Power Net Terminal BHT-103 Dokumentacja Strona 56

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 577
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 55
48
[ 3 ] User-defined Functions
Before calling user-defined functions, it is necessary to define those functions with any of the
following statements. Generally, those statements should be placed before the main routine
starts.
DEF FN (in single-line form)
DEF FN...END DEF (in block form)
SUB...END SUB
FUNCTION...END FUNCTION
When using SUB and FUNCTION functions written in other files, it is necessary to declare
them with the
DECLARE statement before calling them.
[ 4 ] Block-structured Statements
The statements listed below have the statement block structure and are useful for structured
programming.
FOR...NEXT
IF...THEN...ELSE...END IF
SELECT...CASE...END SELECT
WHILE...WEND
Nested Structure
Block-structured statements allow you to write nesting programs as shown below.
FOR i=1 TO 10
FOR j=2 TO 10 STEP 2
PRINT i, j, k
NEXT j
NEXT i
Nesting subroutines as shown below is also possible.
GOSUB aaa
.
.
.
aaa
PRINT "aaa"
GOSUB bbb
RETURN
bbb
PRINT "bbb"
RETURN
Przeglądanie stron 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 576 577

Komentarze do niniejszej Instrukcji

Brak uwag