3 multi-line statements, 3 multićline statements – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 19

3Ć3
3.3
MultiĆLine Statements
In BASIC, a statement can continue onto another line. When a
statement is to be continued, the line is terminated with an
ampersand (&) followed by a <CR>. After the ampersand, only
spaces or tabs are allowed. Other characters will cause compiler
errors. The following is an example of a multiĆline statement.
20
LET MOTOR_REF%=MOTOR_REF%+
& <CR>
SYSTEM_GAIN% Ć OLDGAIN%/2+FACTOR% <CR>
The ampersand tells the compiler that the statement is continuing
on the next line. <CR> without the ampersand before it signifies
that the entire statement is complete. When a statement is continued
on a second line, that line should begin with a tab to provide
maximum readability. The statement below is confusing because the
30 looks like a line number instead of part of an equation.
20 LET MOTOR_REF%=MOTOR_REF%+OLDGAIN%+ & <CR>
30+GAINFACTOR%+VALUE%
<CR>