Rockwell-automation 57C610 Enhanced Basic Language, AutoMax Instrukcja Użytkownika Strona 18

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 146
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 17
3Ć2
2. To provide a reference for conditional and unconditional
transfers of control (GOTO,GOSUB, etc).
Line numbers can be consecutive numbers:
1ăLET M%=23
2ăLET Z%=11
3ăLET K%=Z%+M%
4ăEND
However, writing line numbers in increments of 10 allows for
inserting additional statements between existing lines:
10ăLET M%=23
20ăLET Z%=11
30ăLET K%=Z%+M%
40ăEND
 
In BASIC, one line can be either one statement or several
statements, always terminated by pressing the RETURN <CR> key.
A single statement line consists of:
1.
A line number from 1 to 32767
10
2. A statement keyword PRINT
3. The body of the statement A%+B%
4. A line terminator <CR>
Example of a single statement line:
10 LET SPEED%=(GAIN%+3)/12
<CR>
A multiĆstatement line (more than one statement on a single line)
requires a backslash (\) or a colon (:) to separate each complete
statement. The backslash or colon statement separator must be
typed after every statement except the last one. For example, the
following line contains three complete PRINT statements:
10 PRINT A$\PRINT B$\PRINT C$ <CR>
or
10 PRINT A$:PRINT B$:PRINT C$ <CR>
There is only one line number for a multiĆstatement line. You should
take this into consideration if you plan to transfer control to a
particular statement within a program. For instance, in the above
example, you cannot execute just the statement PRINT B$ without
executing PRINT A$ and PRINT C$ as well.
Przeglądanie stron 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 145 146

Komentarze do niniejszej Instrukcji

Brak uwag