IBM Lotus Symphony


Erl Function [Runtime]

Returns the line number where an error occurred during program execution.

Syntax:

Erl

Return value:

Integer

Parameters:

Note Icon The Erl function only returns a line number, and not a line label.

Example:

sub ExampleError

on error goto ErrorHandler REM Set up error handler

Dim iVar as Integer

Dim sVar As String

REM Error caused by non-existent file

iVar = Freefile

Open "\file9879.txt" for Input as #iVar

Line Input #iVar, sVar

Close #iVar

exit sub

ErrorHandler:

MsgBox "Error " & err & ": " & error$ + chr(13) + "In line : " + Erl + chr(13) + Now , 16 ,"An error occurred"

end sub


Product Feedback | Additional Documentation | Trademarks