Remote Processing Coorporation RPC-320 Dokumentacja Strona 70

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 186
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 69
Commands - 40
ERR
System Variable
SYNTAX: n = ERR
PURPOSE: To return the error code associated with an error.
REMARKS: The function returns the error code for the last error. It is usually used in conjunction with the ERL
function.
Error trapping is essential in control applications, where a halt in execution is not tolerable.
See the Error Messages Chapter for a list of error codes and messages.
RELATED: ERL, ON ERR, RESUME, ERR statement
EXAMPLE: 10 ON ERR GOTO 50 : ’enable error trapping
20 INPUT"Enter a number to divide by. (0 will cause error) : ",A
30 B=10 / A
40 GOTO 20
50 PRINT"Error#" ; ERR ; "occurred on line#";ERL
60 ON ERR GOTO 50 : ’re-enable error trapping
70 RESUME NEXT : ‘resume at next statement after error
ERROR: none
Przeglądanie stron 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 185 186

Komentarze do niniejszej Instrukcji

Brak uwag