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/03020104.xhp | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03020104.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03020104.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03020104.xhp b/helpcontent2/source/text/sbasic/shared/03020104.xhp new file mode 100644 index 000000000..9d09da144 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03020104.xhp @@ -0,0 +1,81 @@ + + + + + + + Reset Statement + /text/sbasic/shared/03020104.xhp + + + + + +
+ + Reset statement + + +

Reset Statement

+Closes all open files and writes the contents of all file buffers to the harddisk. +
+ + + + Reset Statement diagram + + +Reset + + + + +Sub ExampleReset +On Error GoTo ErrorHandler + Dim iNumber As Integer + Dim iCount As Integer + Dim sLine As String + Dim aFile As String + aFile = "C:\Users\ThisUser\data.txt" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "This is a new line of text" + Close #iNumber + iNumber = Freefile + Open aFile For Input As iNumber + For iCount = 1 To 5 + Line Input #iNumber, sLine + If sLine <>"" Then + Rem + End If + Next iCount + Close #iNumber + Exit Sub +ErrorHandler: + Reset + MsgBox "All files will be closed", 0, "Error" +End Sub + + +
+ + +
+ +
\ No newline at end of file -- cgit v1.2.3