2 multi-statement lines, 2 multićstatement lines – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 18

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
3.2
MultiĆStatement Lines
In BASIC, one line can be either one statement or several
statements, always terminated by pressing the RETURN
A single statement line consists of:
1. A line number from 1 to 32767
10
2. A statement keyword
3. The body of the statement
A%+B%
4. A line terminator
Example of a single statement line:
10 LET SPEED%=(GAIN%+3)/12
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$
or
10 PRINT A$:PRINT B$:PRINT C$
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.