From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03050200.xhp | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03050200.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03050200.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03050200.xhp b/helpcontent2/source/text/sbasic/shared/03050200.xhp new file mode 100644 index 000000000..a6ee49f82 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03050200.xhp @@ -0,0 +1,66 @@ + + + + + + + +Err Function +/text/sbasic/shared/03050200.xhp + + +Sun Microsystems, Inc. + + + +
+Err function + +Err Function +Returns an error code that identifies the error that occurred during program execution. +
+Syntax: + +Err + +Return value: +Integer +Parameters: +The Err function is used in error-handling routines to determine the error and the corrective action. +Example: + +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 "Error " & Err & ": " & Error$ + chr(13) + "At line : " + Erl + chr(13) + Now , 16 ,"an error occurred" +End Sub + +
+ +
+ +
\ No newline at end of file -- cgit v1.2.3