beautypg.com

Rpbasic-52 programming guide, Appendix c- error messages – Remote Processing BASIC 52 User Manual

Page 158

background image

RPBASIC-52 PROGRAMMING GUIDE

C-1

APPENDIX C- ERROR MESSAGES

The RPB ASIC-52 error processor helps identify errors.

When running a program , error messages are expressed as:

ERROR: XXX - IN LINE NNN

NNN Instruction
_______X

w h e re X X X i s t h e t y pe o f e r ro r an d N N N is t he p ro g ra m l in e n um b e r w h e re t he e rr o r o c c ur r ed . Th e " __ _ _ __ X "
identifies the very approximate location of the error. For example, a BAD ARGU MENT error occurring at line
100 is expressed as:

ERROR: BAD ARGUMENT - IN LINE 100
100

DBY(257)=5

_____________________X

In Command mode, only the error type is printed since there are no line numbers in Command mode.

RPBASIC-52 errors include:

A - S T A C K
A R I T H . U N D E R F L O W
A R I T H . O V E R F L O W
ARRAY SIZE
B A D A R G U M E N T
B A D S Y N T A X
C - S T A C K
C A N ' T C O N T IN U E
D I V I DE B Y Z E R O
I - ST A C K
M E M O R Y A L L O C A T I O N
NO DATA
H A R D W A R E

A-STACK

The argum ent stack pointer is ou t of bounds. Too m any expression s were push ed or tried to pop non -existent data
off the stack.

ARITH. UNDERFLOW

The re sult of a n arithm etic op eration is beyo nd the lowe r limit o f RPB ASIC -52 floa ting-po int num bers.
RPBASIC-52's smallest floating-point number is ±1E-127. An operation such as 1E-100/1E28 would cause an
ARIT H. UN DER FLOW error.

This exam ple produces a correct result:

>?1e-100/le26
1.0 E-126