Denso Power Net Terminal BHT-7500 Spécifications Page 167

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 560
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 166
158
9.3 Error Trapping
[ 1 ] Overview
If a run-time error occurs during program running, error trapping makes the program cause an
interrupt upon completion of the machine statement so as to transfer control from the current
program to the error-handling routine which has been specified by a label.
If a run-time error occurs when this trapping ability is disabled, the Interpreter will terminate the
current user program while displaying the error message as shown below.
Error message sample:
The above message indicates that a run-time error has occurred at address 38A4h and its
error code is 34h. Both the address and error code are expressed in hexadecimal notation.
The address is a relative address and corresponds to the address in the program list outputted
by the Compiler. According to this address indication, you can pinpoint the program line where
the run-time error has occurred.
The error code 34h (52 in decimal notation) means that the user program attempted to access
a file not opened. (Refer to Appendix A1, Run-time Errors.")
The
ERL and ERR functions described in an error-handling routine will return the same values,
38A4h and 34h, respectively.
NOTE
If an error occurs during execution of user-defined functions or sub routines so that
the error is trapped and handled by the error-handling routine, then do not directly
pass control back to the main routine having the different stack level by using the
RESUME statement. The return address from the user-defined functions or subrou-
tines will be left on the stack, causing a run-time error due to stack overflow.
To prevent such a problem, once transfer control to the routine which caused the
interrupt in order to match the stack level and then jump to any other desired routine.
(Refer to Chapter 3, Section 3.1, "Program Overview.")
ERL=38A4 ERR=34
Vue de la page 166
1 2 ... 162 163 164 165 166 167 168 169 170 171 172 ... 559 560

Commentaires sur ces manuels

Pas de commentaire