ERR/ERL ======= Function -------- **ERR** and **ERL** return the error code and the line number at which the error occurred respectively. Syntax ------ | X = ERR | Y = ERL Example ------- :: 10 GOTO 50 20 A = ERR 30 PRINT "Error Number";A;"at line";ERL 50 ON ERROR GOTO 20 60 B=A/0 70 STOP This example prints: :: Error Number 6 at line 60 due to the floating point error caused by an attempt to divide by zero. Remarks ------- ERR and ERL will always contain the codes of the last error, and will often be used in conjunction with :doc:`error`. These functions are often used in communications with the :doc:`on-error` trap. See :doc:`../basic-programming/errors-and-warnings` for actual error numbers. ERR defaults to zero until an error occurs.