From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03050100.xhp | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03050100.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03050100.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03050100.xhp b/helpcontent2/source/text/sbasic/shared/03050100.xhp new file mode 100644 index 000000000..e10ff2d81 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03050100.xhp @@ -0,0 +1,70 @@ + + + + + + + Erl Function + /text/sbasic/shared/03050100.xhp + + + + + +
+ + Erl function + + +Erl Function +Returns the line number where an error occurred during program execution. +
+ +Syntax: + +Erl + + +Return value: +Integer + +Parameters: +The Erl function only returns a line number, and not a line label. + +Example: + +Sub ExampleError +On Error GoTo ErrorHandler ' Set up error handler +Dim iVar As Integer +Dim sVar As String +' 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 + +
+ +
+ +
-- cgit v1.2.3