Rockwell-automation 1771-DB Basic Module User Manual - Series A Manual de usuario Pagina 160

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 159
Error Messages and
Anomalies
Chapter 9
9–8
2. When
using the variable I before an ELSE statement, put a space between
the I and the ELSE statement. If you do not, the program assumes that
the IE portion of IELSE is the special function operator IE.
This error may or may not yield a BAD SYNTAX — IN LINE XXX
error message, depending on the particular program in which it is
used.
Examples:
Wrong
u20 IF I u10 THEN PRINT IELSE 100
uLIST
20 IF I u10 THEN PRINT I ELSE 100
Right
u20 IF Iu10 THEN PRINT I ELSE 100
uLIST
20 IF I u10 THEN PRINT I ELSE 100
3. Do not place a space character inside the ASC() operator. A statement
like
PRINT
ASC() yields a BAD SYNT
AX ERROR. Y
ou can put spaces
in
strings, however
, allowing the following statement to work properly:
LET $(1) u“HELLO, HOW ARE YOU”
ASC() yields an error because the module eliminates all spaces when
a line is processed. ASC() is stored as ASC() and the module
interprets this as an error.
4. Do not use the following one letter variables: B, F, R. Unpredictable
operation could result.
5. Do
not use the following two letter variables: CR, DO, lE, IF
, IP
, ON, PI,
SP, TO, UI and UO.
6. When
using an INPUT statement to enter data you must be sure to enter
valid data. If you enter invalid data you see the prompt “TR
Y AGAIN”.
This disrupts the screen layout.
7. SQR(M–M2) gives a bad argument if M=O.
8. ONTIME does not interrupt CALL routines, INPUT statements or
PRINT# statements waiting for handshaking (XON, CTS, DCD) to
become true. ONTIME is a polling mechanism which is checked after
each line of BASIC is completed. End of line is either a (CR) or (:).
9.4
Anomalies (continued)
Vista de pagina 159

Comentarios a estos manuales

Sin comentarios