Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 154

Advertising
background image

Error Messages and Anomalies

Chapter 9

9–2

ARITH. UNDERFLOW — An ARITH. UNDERFLOW occurs when an
arithmetic operation exceeds the lower limit of a module floating point
number. The smallest floating point number in the BASIC Module is
+/–lE–127. For example, 1E–80/1E+80 causes an ARITH. UNDERFLOW
error.

ARRAY SIZE — An ARRAY SIZE error occurs if an array is dimensioned
by a DIM statement and you attempt to access a variable that is outside of
the dimensioned bounds.

Example:

uDIM A(10)

uPrint A(11)

ERROR: ARRAY SIZE
READY

BAD ARGUMENT — A BAD ARGUMENT error occurs when the
argument of an operator is not within the limits of the operator. For
example, SQR(–12) generates a BAD ARGUMENT error because the
value of the SQR argument is limited to positive numbers.

BAD SYNTAX — A BAD SYNTAX error occurs when either an invalid
BASIC Module command, statement or operator is entered and BASIC
cannot process the entry. Check to make sure that all entries are correct.

C-STACK — A C-STACK (CONTROL STACK) error occurs if:

the control stack pointer is forced “out of bounds”.

you attempt to use more control stack than is available in the module.

you execute a RETURN before a GOSUB, a WHILE or UNTIL before
a DO, or a NEXT before a FOR.

you jump out of loop structures such as DO WHILE.

CAN’T CONTINUE — A CAN’T CONTINUE error appears if:

you edit the program after halting execution and then enter the CONT
command.

you enter CTRL C while in a call routine.

You can halt program execution by either entering CTRL C or by
executing a STOP statement. Normally, program execution continues after
entering the CONT command. You must enter CTRL C during program
execution or you must execute a STOP statement before the CONT
command can work.

DIVIDE BY ZERO — A DIVIDE BY ZERO error occurs if you attempt
to divide by zero (12/0).

9.2
Error Messages from
BASIC (continued)

Advertising