Erl Function

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

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


Erl

āļ†āļ´āˇƒāˇ” āļŊāļļāˇāļ¯āˇ™āļą āļ…āļœāļē:

Integer

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

Note Icon

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


āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


Sub ExampleError
on error goto ErrorHandler REM Set up error handler
Dim iVar As Integer
Dim sVar As String
REM Error occurs due to non-existent file
    iVar = Freefile
    Open "\file9879.txt" For Input As #iVar
    Line Input #iVar, sVar
    Close #iVar
    Exit Sub
ErrorHandler:
    MsgBox "āļ¯āˇāˇ‚āļē " & Err & ": " & Error$ + chr(13) + "āļ´āˇšāˇ…āˇ’ āļ…āļ‚āļšāļē : " + Erl + chr(13) + Now , 16 ,"āļ¯āˇāˇ‚āļēāļšāˇŠ āˇƒāˇ’āļ¯āˇ”āˇ€āˇ’āļē"
End Sub

Please support us!