ERL - QB64 Wiki

ERL

From QB64 Wiki

Revision as of 12:00, 26 May 2012 by Clippy (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The ERL function returns the closest previous line number before the last error.


Syntax:

result& = ERL


Description:

  • Used in an error handler to report the last line number used before the error.
  • If the program does not use line numbers, then ERL returns 0.
  • Use _ERRORLINE to return the actual code line position of an error in a QB64 program.


Example: Using a fake error code to return the line number position in a program.

ON ERROR GOTO errorfix 1 ERROR 250 ERROR 250 5 ERROR 250 END errorfix: PRINT ERL RESUME NEXT

1 1 5


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page