Rockwell-automation 57C610 Enhanced Basic Language, AutoMax Uživatelský manuál Strana 19

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 146
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 18
3Ć3
 
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>
Zobrazit stránku 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 145 146

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

Žádné komentáře