From 8ff2c5f505ed1f29901313692b8e3ca5d100d225 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 16 Jun 2016 15:41:33 +0100 Subject: Resolves: tdf#99861 Recover lost basic in help indentation regression from... commit 6614bedceadcc07ec082c5e926107f27903bda5c Date: Mon Jan 25 20:07:10 2016 +0100 fix validation errors by round-trip through helpauthoring extension with git show 6614bedceadcc07ec082c5e926107f27903bda5c | ~/recoverindent.py import fileinput import re import sys added = [] removed = [] filename = "" def processlastfile(filename, added, removed): if len(added) != len(removed): print "BROKEN" sys.exit(-2) if len(removed): f = open(filename, "rw") linestring = open(filename, "r").read() start = 0 for x in range(0, len(added)): if added[x] == removed[x]: continue if added[x].strip() != removed[x].strip(): print "BROKEN" sys.exit(-2) if filename == "source/text/sbasic/shared/03080301.xhp" and x == 6: print "skipping special hunk", removed[x], "in source/text/sbasic/shared/03080301.xhp" else: start = linestring.find(added[x], start) if start == -1: print "BROKEN" sys.exit(-2) linestring = linestring[0:start] + removed[x] + linestring[start + len(added[x]):] start = start + len(removed[x]) open(filename, "w").write(linestring) for line in fileinput.input(): if line.startswith("--- a/"): if filename is not "": processlastfile(filename, added, removed) added = [] removed = [] filename = line[6:-1] elif "role=\"bascode\"" in line: m = re.search('>(.+?)<', line) code = m.group(1) if line.startswith("-"): removed.append(code) else: added.append(code) processlastfile(filename, added, removed) which puts the code back the way it was, except for one string which had changed and was fixed manually afterwards (cherry picked from commit 5f7e3ad041ddf022f6b0feb11fac1debbcf835b2) Change-Id: Ic67abf36bb5d27be58a51ebbf5022830f56dcb37 --- source/text/sbasic/shared/01020300.xhp | 14 ++++---- source/text/sbasic/shared/03010101.xhp | 8 ++--- source/text/sbasic/shared/03010102.xhp | 6 ++-- source/text/sbasic/shared/03010103.xhp | 24 +++++++------- source/text/sbasic/shared/03010201.xhp | 4 +-- source/text/sbasic/shared/03010301.xhp | 10 +++--- source/text/sbasic/shared/03010302.xhp | 10 +++--- source/text/sbasic/shared/03010303.xhp | 10 +++--- source/text/sbasic/shared/03010304.xhp | 6 ++-- source/text/sbasic/shared/03010305.xhp | 10 +++--- source/text/sbasic/shared/03020101.xhp | 34 ++++++++++---------- source/text/sbasic/shared/03020102.xhp | 34 ++++++++++---------- source/text/sbasic/shared/03020103.xhp | 32 +++++++++---------- source/text/sbasic/shared/03020104.xhp | 34 ++++++++++---------- source/text/sbasic/shared/03020201.xhp | 40 +++++++++++------------ source/text/sbasic/shared/03020203.xhp | 32 +++++++++---------- source/text/sbasic/shared/03020204.xhp | 40 +++++++++++------------ source/text/sbasic/shared/03020205.xhp | 18 +++++------ source/text/sbasic/shared/03020301.xhp | 32 +++++++++---------- source/text/sbasic/shared/03020401.xhp | 12 +++---- source/text/sbasic/shared/03020402.xhp | 2 +- source/text/sbasic/shared/03020403.xhp | 12 +++---- source/text/sbasic/shared/03020404.xhp | 26 +++++++-------- source/text/sbasic/shared/03020405.xhp | 14 ++++---- source/text/sbasic/shared/03020406.xhp | 2 +- source/text/sbasic/shared/03020407.xhp | 2 +- source/text/sbasic/shared/03020408.xhp | 2 +- source/text/sbasic/shared/03020409.xhp | 18 +++++------ source/text/sbasic/shared/03020410.xhp | 2 +- source/text/sbasic/shared/03020411.xhp | 58 +++++++++++++++++----------------- source/text/sbasic/shared/03020412.xhp | 2 +- source/text/sbasic/shared/03020413.xhp | 10 +++--- source/text/sbasic/shared/03020414.xhp | 20 ++++++------ source/text/sbasic/shared/03020415.xhp | 6 ++-- source/text/sbasic/shared/03030107.xhp | 2 +- source/text/sbasic/shared/03030110.xhp | 2 +- source/text/sbasic/shared/03030111.xhp | 4 +-- source/text/sbasic/shared/03030112.xhp | 4 +-- source/text/sbasic/shared/03030113.xhp | 4 +-- source/text/sbasic/shared/03030114.xhp | 4 +-- source/text/sbasic/shared/03030115.xhp | 2 +- source/text/sbasic/shared/03030116.xhp | 2 +- source/text/sbasic/shared/03030120.xhp | 2 +- source/text/sbasic/shared/03030130.xhp | 2 +- source/text/sbasic/shared/03030203.xhp | 2 +- source/text/sbasic/shared/03030204.xhp | 2 +- source/text/sbasic/shared/03030205.xhp | 8 ++--- source/text/sbasic/shared/03030206.xhp | 20 ++++++------ source/text/sbasic/shared/03030301.xhp | 2 +- source/text/sbasic/shared/03030302.xhp | 2 +- source/text/sbasic/shared/03030303.xhp | 14 ++++---- source/text/sbasic/shared/03050100.xhp | 12 +++---- source/text/sbasic/shared/03050500.xhp | 34 ++++++++++---------- source/text/sbasic/shared/03060100.xhp | 12 +++---- source/text/sbasic/shared/03060200.xhp | 12 +++---- source/text/sbasic/shared/03060300.xhp | 12 +++---- source/text/sbasic/shared/03060400.xhp | 10 +++--- source/text/sbasic/shared/03060500.xhp | 12 +++---- source/text/sbasic/shared/03060600.xhp | 12 +++---- source/text/sbasic/shared/03070100.xhp | 8 ++--- source/text/sbasic/shared/03070200.xhp | 8 ++--- source/text/sbasic/shared/03070300.xhp | 8 ++--- source/text/sbasic/shared/03070400.xhp | 8 ++--- source/text/sbasic/shared/03070500.xhp | 4 +-- source/text/sbasic/shared/03070600.xhp | 12 +++---- source/text/sbasic/shared/03080101.xhp | 6 ++-- source/text/sbasic/shared/03080102.xhp | 6 ++-- source/text/sbasic/shared/03080103.xhp | 6 ++-- source/text/sbasic/shared/03080104.xhp | 6 ++-- source/text/sbasic/shared/03080201.xhp | 6 ++-- source/text/sbasic/shared/03080202.xhp | 4 +-- source/text/sbasic/shared/03080301.xhp | 20 ++++++------ source/text/sbasic/shared/03080302.xhp | 22 ++++++------- source/text/sbasic/shared/03080401.xhp | 4 +-- source/text/sbasic/shared/03080501.xhp | 6 ++-- source/text/sbasic/shared/03080502.xhp | 6 ++-- source/text/sbasic/shared/03080601.xhp | 6 ++-- source/text/sbasic/shared/03080701.xhp | 6 ++-- source/text/sbasic/shared/03080801.xhp | 14 ++++---- source/text/sbasic/shared/03080802.xhp | 2 +- source/text/sbasic/shared/03090101.xhp | 22 ++++++------- source/text/sbasic/shared/03090102.xhp | 22 ++++++------- source/text/sbasic/shared/03090201.xhp | 16 +++++----- source/text/sbasic/shared/03090202.xhp | 44 +++++++++++++------------- source/text/sbasic/shared/03090301.xhp | 22 ++++++------- source/text/sbasic/shared/03090303.xhp | 20 ++++++------ source/text/sbasic/shared/03090402.xhp | 6 ++-- source/text/sbasic/shared/03090403.xhp | 6 ++-- source/text/sbasic/shared/03090404.xhp | 22 ++++++------- source/text/sbasic/shared/03090405.xhp | 6 ++-- source/text/sbasic/shared/03090406.xhp | 26 +++++++-------- source/text/sbasic/shared/03090407.xhp | 6 ++-- source/text/sbasic/shared/03090408.xhp | 6 ++-- source/text/sbasic/shared/03090409.xhp | 2 +- source/text/sbasic/shared/03090410.xhp | 6 ++-- source/text/sbasic/shared/03090412.xhp | 26 +++++++-------- source/text/sbasic/shared/03100100.xhp | 16 +++++----- source/text/sbasic/shared/03100300.xhp | 4 +-- source/text/sbasic/shared/03100400.xhp | 6 ++-- source/text/sbasic/shared/03100500.xhp | 6 ++-- source/text/sbasic/shared/03100600.xhp | 6 ++-- source/text/sbasic/shared/03100700.xhp | 8 ++--- source/text/sbasic/shared/03100900.xhp | 8 ++--- source/text/sbasic/shared/03101000.xhp | 12 +++---- source/text/sbasic/shared/03101100.xhp | 2 +- source/text/sbasic/shared/03101120.xhp | 2 +- source/text/sbasic/shared/03101130.xhp | 2 +- source/text/sbasic/shared/03101140.xhp | 2 +- source/text/sbasic/shared/03101300.xhp | 2 +- source/text/sbasic/shared/03101400.xhp | 2 +- source/text/sbasic/shared/03101500.xhp | 2 +- source/text/sbasic/shared/03101600.xhp | 2 +- source/text/sbasic/shared/03102000.xhp | 4 +-- source/text/sbasic/shared/03102100.xhp | 14 ++++---- source/text/sbasic/shared/03102101.xhp | 4 +-- source/text/sbasic/shared/03102200.xhp | 2 +- source/text/sbasic/shared/03102300.xhp | 8 ++--- source/text/sbasic/shared/03102400.xhp | 4 +-- source/text/sbasic/shared/03102600.xhp | 2 +- source/text/sbasic/shared/03102700.xhp | 8 ++--- source/text/sbasic/shared/03102900.xhp | 12 +++---- source/text/sbasic/shared/03103000.xhp | 12 +++---- source/text/sbasic/shared/03103100.xhp | 4 +-- source/text/sbasic/shared/03103200.xhp | 4 +-- source/text/sbasic/shared/03103300.xhp | 8 ++--- source/text/sbasic/shared/03103400.xhp | 4 +-- source/text/sbasic/shared/03103450.xhp | 4 +-- source/text/sbasic/shared/03103500.xhp | 24 +++++++------- source/text/sbasic/shared/03103600.xhp | 12 +++---- source/text/sbasic/shared/03103700.xhp | 4 +-- source/text/sbasic/shared/03110100.xhp | 16 +++++----- source/text/sbasic/shared/03120101.xhp | 6 ++-- source/text/sbasic/shared/03120102.xhp | 6 ++-- source/text/sbasic/shared/03120103.xhp | 6 ++-- source/text/sbasic/shared/03120104.xhp | 4 +-- source/text/sbasic/shared/03120201.xhp | 12 +++---- source/text/sbasic/shared/03120202.xhp | 8 ++--- source/text/sbasic/shared/03120301.xhp | 6 ++-- source/text/sbasic/shared/03120302.xhp | 6 ++-- source/text/sbasic/shared/03120303.xhp | 14 ++++---- source/text/sbasic/shared/03120304.xhp | 38 +++++++++++----------- source/text/sbasic/shared/03120305.xhp | 18 +++++------ source/text/sbasic/shared/03120306.xhp | 14 ++++---- source/text/sbasic/shared/03120307.xhp | 14 ++++---- source/text/sbasic/shared/03120308.xhp | 38 +++++++++++----------- source/text/sbasic/shared/03120309.xhp | 18 +++++------ source/text/sbasic/shared/03120310.xhp | 6 ++-- source/text/sbasic/shared/03120311.xhp | 18 +++++------ source/text/sbasic/shared/03120314.xhp | 42 ++++++++++++------------ source/text/sbasic/shared/03120401.xhp | 6 ++-- source/text/sbasic/shared/03120403.xhp | 6 ++-- source/text/sbasic/shared/03130500.xhp | 2 +- source/text/sbasic/shared/03130700.xhp | 8 ++--- source/text/sbasic/shared/03130800.xhp | 6 ++-- source/text/sbasic/shared/03131000.xhp | 4 +-- source/text/sbasic/shared/03131300.xhp | 2 +- source/text/sbasic/shared/03131400.xhp | 2 +- source/text/sbasic/shared/03131600.xhp | 14 ++++---- source/text/sbasic/shared/03132000.xhp | 16 +++++----- source/text/sbasic/shared/03132200.xhp | 8 ++--- source/text/sbasic/shared/03132400.xhp | 8 ++--- 161 files changed, 897 insertions(+), 897 deletions(-) diff --git a/source/text/sbasic/shared/01020300.xhp b/source/text/sbasic/shared/01020300.xhp index 70d2b0813a..b29adfb30e 100644 --- a/source/text/sbasic/shared/01020300.xhp +++ b/source/text/sbasic/shared/01020300.xhp @@ -113,18 +113,18 @@ ' ***** Module1 ***** Private myText As String Sub initMyText - myText = "Hello" - Print "In module1 : ", myText + myText = "Hello" + Print "In module1 : ", myText End Sub ' ***** Module2 ***** 'Option Explicit Sub demoBug - CompatibilityMode( true ) - initMyText - ' Now returns empty string - ' (or rises error for Option Explicit) - Print "Now in module2 : ", myText + CompatibilityMode( true ) + initMyText + ' Now returns empty string + ' (or rises error for Option Explicit) + Print "Now in module2 : ", myText End Sub diff --git a/source/text/sbasic/shared/03010101.xhp b/source/text/sbasic/shared/03010101.xhp index b4aa9f9ed3..86acce126b 100644 --- a/source/text/sbasic/shared/03010101.xhp +++ b/source/text/sbasic/shared/03010101.xhp @@ -66,10 +66,10 @@ Example: Sub ExampleMsgBox - Const sText1 = "An unexpected error occurred." - Const sText2 = "The program execution will continue, however." - Const sText3 = "Error" - MsgBox(sText1 + Chr(13) + sText2,16,sText3) + Const sText1 = "An unexpected error occurred." + Const sText2 = "The program execution will continue, however." + Const sText3 = "Error" + MsgBox(sText1 + Chr(13) + sText2,16,sText3) End Sub diff --git a/source/text/sbasic/shared/03010102.xhp b/source/text/sbasic/shared/03010102.xhp index 731a744536..b11459e74f 100644 --- a/source/text/sbasic/shared/03010102.xhp +++ b/source/text/sbasic/shared/03010102.xhp @@ -79,9 +79,9 @@ Sub ExampleMsgBox Dim sVar As Integer - sVar = MsgBox("Las Vegas") - sVar = MsgBox("Las Vegas",1) - sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title") + sVar = MsgBox("Las Vegas") + sVar = MsgBox("Las Vegas",1) + sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title") End Sub diff --git a/source/text/sbasic/shared/03010103.xhp b/source/text/sbasic/shared/03010103.xhp index 610cf8ab16..8836bda3e4 100644 --- a/source/text/sbasic/shared/03010103.xhp +++ b/source/text/sbasic/shared/03010103.xhp @@ -58,24 +58,24 @@ Sub ExamplePrint - Print "ABC" - Print "ABC","123" - i = FreeFile() - Open "C:\Temp.txt" For Output As i - Print #i, "ABC" - Close #i + Print "ABC" + Print "ABC","123" + i = FreeFile() + Open "C:\Temp.txt" For Output As i + Print #i, "ABC" + Close #i End Sub Sub ExamplePrint - Print "ABC" - Print "ABC","123" - i = FreeFile() - Open "~/temp.txt" For Output As i - Print #i, "ABC" - Close #i + Print "ABC" + Print "ABC","123" + i = FreeFile() + Open "~/temp.txt" For Output As i + Print #i, "ABC" + Close #i End Sub diff --git a/source/text/sbasic/shared/03010201.xhp b/source/text/sbasic/shared/03010201.xhp index fbf49414ec..f845c50ac0 100644 --- a/source/text/sbasic/shared/03010201.xhp +++ b/source/text/sbasic/shared/03010201.xhp @@ -59,8 +59,8 @@ Sub ExampleInputBox Dim sText As String - sText = InputBox ("Please enter a phrase:","Dear User") - MsgBox ( sText , 64, "Confirmation of phrase") + sText = InputBox ("Please enter a phrase:","Dear User") + MsgBox ( sText , 64, "Confirmation of phrase") End Sub diff --git a/source/text/sbasic/shared/03010301.xhp b/source/text/sbasic/shared/03010301.xhp index c18b4af8cc..3903137612 100644 --- a/source/text/sbasic/shared/03010301.xhp +++ b/source/text/sbasic/shared/03010301.xhp @@ -55,11 +55,11 @@ Sub ExampleColor Dim lVar As Long - lVar = rgb(128,0,200) - MsgBox "The color " & lVar & " consists of:" & Chr(13) &_ - "red= " & Red(lVar) & Chr(13)&_ - "green= " & Green(lVar) & Chr(13)&_ - "blue= " & Blue(lVar) & Chr(13) , 64,"colors" + lVar = rgb(128,0,200) + MsgBox "The color " & lVar & " consists of:" & Chr(13) &_ + "red= " & Red(lVar) & Chr(13)&_ + "green= " & Green(lVar) & Chr(13)&_ + "blue= " & Blue(lVar) & Chr(13) , 64,"colors" End Sub diff --git a/source/text/sbasic/shared/03010302.xhp b/source/text/sbasic/shared/03010302.xhp index 72eb956206..12b36efbca 100644 --- a/source/text/sbasic/shared/03010302.xhp +++ b/source/text/sbasic/shared/03010302.xhp @@ -55,11 +55,11 @@ Sub ExampleColor Dim lVar As Long - lVar = rgb(128,0,200) - MsgBox "The color " & lVar & " contains the components:" & Chr(13) &_ - "red = " & red(lVar) & Chr(13)&_ - "green = " & green(lVar) & Chr(13)&_ - "blue = " & blue(lVar) & Chr(13) , 64,"colors" + lVar = rgb(128,0,200) + MsgBox "The color " & lVar & " contains the components:" & Chr(13) &_ + "red = " & red(lVar) & Chr(13)&_ + "green = " & green(lVar) & Chr(13)&_ + "blue = " & blue(lVar) & Chr(13) , 64,"colors" End Sub diff --git a/source/text/sbasic/shared/03010303.xhp b/source/text/sbasic/shared/03010303.xhp index 1efae60876..16b0fcc947 100644 --- a/source/text/sbasic/shared/03010303.xhp +++ b/source/text/sbasic/shared/03010303.xhp @@ -55,11 +55,11 @@ Sub ExampleColor Dim lVar As Long - lVar = rgb(128,0,200) - MsgBox "The color " & lVar & " consists of:" & Chr(13) &_ - "red= " & red(lVar) & Chr(13)&_ - "green= " & green(lVar) & Chr(13)&_ - "blue= " & blue(lVar) & Chr(13) , 64,"colors" + lVar = rgb(128,0,200) + MsgBox "The color " & lVar & " consists of:" & Chr(13) &_ + "red= " & red(lVar) & Chr(13)&_ + "green= " & green(lVar) & Chr(13)&_ + "blue= " & blue(lVar) & Chr(13) , 64,"colors" End Sub diff --git a/source/text/sbasic/shared/03010304.xhp b/source/text/sbasic/shared/03010304.xhp index bf9c0eba0d..86dca1072e 100644 --- a/source/text/sbasic/shared/03010304.xhp +++ b/source/text/sbasic/shared/03010304.xhp @@ -70,9 +70,9 @@ Sub ExampleQBColor Dim iColor As Integer Dim sText As String - iColor = 7 - sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) ) - MsgBox stext,0,"Color " & iColor + iColor = 7 + sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) ) + MsgBox stext,0,"Color " & iColor End Sub diff --git a/source/text/sbasic/shared/03010305.xhp b/source/text/sbasic/shared/03010305.xhp index 56971d27fa..fec09cf27f 100644 --- a/source/text/sbasic/shared/03010305.xhp +++ b/source/text/sbasic/shared/03010305.xhp @@ -53,11 +53,11 @@ Sub ExampleColor Dim lVar As Long - lVar = rgb(128,0,200) - MsgBox "The color " & lVar & " consists of:" & Chr(13) &_ - "red= " & red(lVar) & Chr(13)&_ - "green= " & green(lVar) & Chr(13)&_ - "blue= " & blue(lVar) & Chr(13) , 64,"colors" + lVar = rgb(128,0,200) + MsgBox "The color " & lVar & " consists of:" & Chr(13) &_ + "red= " & red(lVar) & Chr(13)&_ + "green= " & green(lVar) & Chr(13)&_ + "blue= " & blue(lVar) & Chr(13) , 64,"colors" End Sub diff --git a/source/text/sbasic/shared/03020101.xhp b/source/text/sbasic/shared/03020101.xhp index 699a141b57..d0d164a710 100644 --- a/source/text/sbasic/shared/03020101.xhp +++ b/source/text/sbasic/shared/03020101.xhp @@ -53,23 +53,23 @@ Dim sLine As String Dim aFile As String Dim sMsg As String - aFile = "c:\data.txt" - sMsg = "" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "First line of text" - Print #iNumber, "Another line of text" - Close #iNumber - iNumber = Freefile - Open aFile For Input As iNumber - While Not eof(iNumber) - Line Input #iNumber, sLine - If sLine <>"" Then - sMsg = sMsg & sLine & chr(13) - End If - Wend - Close #iNumber - MsgBox sMsg + aFile = "c:\data.txt" + sMsg = "" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "First line of text" + Print #iNumber, "Another line of text" + Close #iNumber + iNumber = Freefile + Open aFile For Input As iNumber + While Not eof(iNumber) + Line Input #iNumber, sLine + If sLine <>"" Then + sMsg = sMsg & sLine & chr(13) + End If + Wend + Close #iNumber + MsgBox sMsg End Sub diff --git a/source/text/sbasic/shared/03020102.xhp b/source/text/sbasic/shared/03020102.xhp index ee262afed8..4008a82156 100644 --- a/source/text/sbasic/shared/03020102.xhp +++ b/source/text/sbasic/shared/03020102.xhp @@ -59,23 +59,23 @@ Dim sLine As String Dim aFile As String Dim sMsg As String - aFile = "c:\data.txt" - sMsg = "" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "First line of text" - Print #iNumber, "Another line of text" - Close #iNumber - iNumber = Freefile - Open aFile For Input As #iNumber - While Not eof(#iNumber) - Line Input #iNumber, sLine - If sLine <>"" Then - sMsg = sMsg & sLine & chr(13) - End If - Wend - Close #iNumber - MsgBox sMsg + aFile = "c:\data.txt" + sMsg = "" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "First line of text" + Print #iNumber, "Another line of text" + Close #iNumber + iNumber = Freefile + Open aFile For Input As #iNumber + While Not eof(#iNumber) + Line Input #iNumber, sLine + If sLine <>"" Then + sMsg = sMsg & sLine & chr(13) + End If + Wend + Close #iNumber + MsgBox sMsg End Sub diff --git a/source/text/sbasic/shared/03020103.xhp b/source/text/sbasic/shared/03020103.xhp index a15be220d9..c22f3b5374 100644 --- a/source/text/sbasic/shared/03020103.xhp +++ b/source/text/sbasic/shared/03020103.xhp @@ -59,22 +59,22 @@ Dim sLine As String Dim aFile As String Dim sMsg As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "This is a line of text" - Print #iNumber, "This is another line of text" - Close #iNumber - iNumber = Freefile - Open aFile For Input As iNumber - While Not eof(iNumber) - Line Input #iNumber, sLine - If sLine <>"" Then - sMsg = sMsg & sLine & chr(13) - End If - Wend - Close #iNumber - MsgBox sMsg + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "This is a line of text" + Print #iNumber, "This is another line of text" + Close #iNumber + iNumber = Freefile + Open aFile For Input As iNumber + While Not eof(iNumber) + Line Input #iNumber, sLine + If sLine <>"" Then + sMsg = sMsg & sLine & chr(13) + End If + Wend + Close #iNumber + MsgBox sMsg End Sub diff --git a/source/text/sbasic/shared/03020104.xhp b/source/text/sbasic/shared/03020104.xhp index 3948940d0d..cd7124e087 100644 --- a/source/text/sbasic/shared/03020104.xhp +++ b/source/text/sbasic/shared/03020104.xhp @@ -51,24 +51,24 @@ Dim iCount As Integer Dim sLine As String Dim aFile As String - aFile = "c:\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 + aFile = "c:\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" + Reset + MsgBox "All files will be closed",0,"Error" End Sub diff --git a/source/text/sbasic/shared/03020201.xhp b/source/text/sbasic/shared/03020201.xhp index cd67c75d60..700dca48eb 100644 --- a/source/text/sbasic/shared/03020201.xhp +++ b/source/text/sbasic/shared/03020201.xhp @@ -57,26 +57,26 @@ Dim iNumber As Integer Dim sText As Variant ' Must be a variant Dim aFile As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Random As #iNumber Len=32 - Seek #iNumber,1 ' Position at beginning - Put #iNumber,, "This is the first line of text" ' Fill line with text - Put #iNumber,, "This is the second line of text" - Put #iNumber,, "This is the third line of text" - Seek #iNumber,2 - Get #iNumber,,sText - Print sText - Close #iNumber - iNumber = Freefile - Open aFile For Random As #iNumber Len=32 - Get #iNumber,2,sText - Put #iNumber,,"This is a new text" - Get #iNumber,1,sText - Get #iNumber,2,sText - Put #iNumber,20,"This is the text in record 20" - Print Lof(#iNumber) - Close #iNumber + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Random As #iNumber Len=32 + Seek #iNumber,1 ' Position at beginning + Put #iNumber,, "This is the first line of text" ' Fill line with text + Put #iNumber,, "This is the second line of text" + Put #iNumber,, "This is the third line of text" + Seek #iNumber,2 + Get #iNumber,,sText + Print sText + Close #iNumber + iNumber = Freefile + Open aFile For Random As #iNumber Len=32 + Get #iNumber,2,sText + Put #iNumber,,"This is a new text" + Get #iNumber,1,sText + Get #iNumber,2,sText + Put #iNumber,20,"This is the text in record 20" + Print Lof(#iNumber) + Close #iNumber End Sub diff --git a/source/text/sbasic/shared/03020203.xhp b/source/text/sbasic/shared/03020203.xhp index 1be787fe0c..ad394f27bc 100644 --- a/source/text/sbasic/shared/03020203.xhp +++ b/source/text/sbasic/shared/03020203.xhp @@ -55,22 +55,22 @@ Dim sLine As String Dim aFile As String Dim sMsg As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "This is a line of text" - Print #iNumber, "This is another line of text" - Close #iNumber - iNumber = Freefile - Open aFile For Input As iNumber - While Not EOF(iNumber) - Line Input #iNumber, sLine - If sLine <>"" Then - sMsg = sMsg & sLine & chr(13) - End If - Wend - Close #iNumber - MsgBox sMsg + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "This is a line of text" + Print #iNumber, "This is another line of text" + Close #iNumber + iNumber = Freefile + Open aFile For Input As iNumber + While Not EOF(iNumber) + Line Input #iNumber, sLine + If sLine <>"" Then + sMsg = sMsg & sLine & chr(13) + End If + Wend + Close #iNumber + MsgBox sMsg End Sub diff --git a/source/text/sbasic/shared/03020204.xhp b/source/text/sbasic/shared/03020204.xhp index 4f7be26a62..bbddbba5fa 100644 --- a/source/text/sbasic/shared/03020204.xhp +++ b/source/text/sbasic/shared/03020204.xhp @@ -58,26 +58,26 @@ Dim iNumber As Integer Dim sText As Variant ' Must be a variant type Dim aFile As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Random As #iNumber Len=32 - Seek #iNumber,1 ' Position To start writing - Put #iNumber,, "This is the first line of text" ' Fill line with text - Put #iNumber,, "This is the second line of text" - Put #iNumber,, "This is the third line of text" - Seek #iNumber,2 - Get #iNumber,,sText - Print sText - Close #iNumber - iNumber = Freefile - Open aFile For Random As #iNumber Len=32 - Get #iNumber,2,sText - Put #iNumber,,"This is new text" - Get #iNumber,1,sText - Get #iNumber,2,sText - Put #iNumber,20,"This is the text in record 20" - Print Lof(#iNumber) - Close #iNumber + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Random As #iNumber Len=32 + Seek #iNumber,1 ' Position To start writing + Put #iNumber,, "This is the first line of text" ' Fill line with text + Put #iNumber,, "This is the second line of text" + Put #iNumber,, "This is the third line of text" + Seek #iNumber,2 + Get #iNumber,,sText + Print sText + Close #iNumber + iNumber = Freefile + Open aFile For Random As #iNumber Len=32 + Get #iNumber,2,sText + Put #iNumber,,"This is new text" + Get #iNumber,1,sText + Get #iNumber,2,sText + Put #iNumber,20,"This is the text in record 20" + Print Lof(#iNumber) + Close #iNumber End Sub diff --git a/source/text/sbasic/shared/03020205.xhp b/source/text/sbasic/shared/03020205.xhp index 725c040f09..138f697cfb 100644 --- a/source/text/sbasic/shared/03020205.xhp +++ b/source/text/sbasic/shared/03020205.xhp @@ -57,15 +57,15 @@ Sub ExampleWrite Dim iCount As Integer Dim sValue As String - iCount = Freefile - Open "C:\data.txt" For Output As iCount - sValue = "Hamburg" - Write #iCount,sValue,200 - sValue = "New York" - Write #iCount,sValue,300 - sValue = "Miami" - Write #iCount,sValue,450 - Close #iCount + iCount = Freefile + Open "C:\data.txt" For Output As iCount + sValue = "Hamburg" + Write #iCount,sValue,200 + sValue = "New York" + Write #iCount,sValue,300 + sValue = "Miami" + Write #iCount,sValue,450 + Close #iCount End Sub diff --git a/source/text/sbasic/shared/03020301.xhp b/source/text/sbasic/shared/03020301.xhp index 04dc154d87..e20c252537 100644 --- a/source/text/sbasic/shared/03020301.xhp +++ b/source/text/sbasic/shared/03020301.xhp @@ -60,22 +60,22 @@ Dim sLine As String Dim aFile As String Dim sMsg As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "First line of text" - Print #iNumber, "Another line of text" - Close #iNumber - iNumber = Freefile - Open aFile For Input As iNumber - While Not eof(iNumber) - Line Input #iNumber, sLine - If sLine <>"" Then - sMsg = sMsg & sLine & chr(13) - End If - Wend - Close #iNumber - MsgBox sMsg + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "First line of text" + Print #iNumber, "Another line of text" + Close #iNumber + iNumber = Freefile + Open aFile For Input As iNumber + While Not eof(iNumber) + Line Input #iNumber, sLine + If sLine <>"" Then + sMsg = sMsg & sLine & chr(13) + End If + Wend + Close #iNumber + MsgBox sMsg End Sub diff --git a/source/text/sbasic/shared/03020401.xhp b/source/text/sbasic/shared/03020401.xhp index 9df35db2ec..c9e0978ef2 100644 --- a/source/text/sbasic/shared/03020401.xhp +++ b/source/text/sbasic/shared/03020401.xhp @@ -58,12 +58,12 @@ Sub ExampleChDir Dim sDir1 As String , sDir2 As String - sDir1 = "c:\Test" - sDir2 = "d:\Private" - ChDir( sDir1 ) - MsgBox CurDir - ChDir( sDir2 ) - MsgBox CurDir + sDir1 = "c:\Test" + sDir2 = "d:\Private" + ChDir( sDir1 ) + MsgBox CurDir + ChDir( sDir2 ) + MsgBox CurDir End Sub diff --git a/source/text/sbasic/shared/03020402.xhp b/source/text/sbasic/shared/03020402.xhp index 77f4178ccd..33604d5262 100644 --- a/source/text/sbasic/shared/03020402.xhp +++ b/source/text/sbasic/shared/03020402.xhp @@ -55,7 +55,7 @@ Example: Sub ExampleChDrive - ChDrive "D" ' Only possible if a drive 'D' exists. + ChDrive "D" ' Only possible if a drive 'D' exists. End Sub diff --git a/source/text/sbasic/shared/03020403.xhp b/source/text/sbasic/shared/03020403.xhp index 650422801c..0a8a32b0a8 100644 --- a/source/text/sbasic/shared/03020403.xhp +++ b/source/text/sbasic/shared/03020403.xhp @@ -61,12 +61,12 @@ Sub ExampleCurDir Dim sDir1 As String , sDir2 As String - sDir1 = "c:\Test" - sDir2 = "d:\Private" - ChDir( sDir1 ) - MsgBox CurDir - ChDir( sDir2 ) - MsgBox CurDir + sDir1 = "c:\Test" + sDir2 = "d:\Private" + ChDir( sDir1 ) + MsgBox CurDir + ChDir( sDir2 ) + MsgBox CurDir End Sub diff --git a/source/text/sbasic/shared/03020404.xhp b/source/text/sbasic/shared/03020404.xhp index b386b29182..82cb4e583c 100644 --- a/source/text/sbasic/shared/03020404.xhp +++ b/source/text/sbasic/shared/03020404.xhp @@ -65,19 +65,19 @@ ' Displays all files and directories Dim sPath As String Dim sDir As String, sValue As String - sDir="Directories:" - sPath = CurDir - sValue = Dir$(sPath + getPathSeparator + "*",16) - Do - If sValue <> "." And sValue <> ".." Then - If (GetAttr( sPath + getPathSeparator + sValue) And 16) >0 Then - ' Get the directories - sDir = sDir & chr(13) & sValue - End If - End If - sValue = Dir$ - Loop Until sValue = "" - MsgBox sDir,0,sPath + sDir="Directories:" + sPath = CurDir + sValue = Dir$(sPath + getPathSeparator + "*",16) + Do + If sValue <> "." And sValue <> ".." Then + If (GetAttr( sPath + getPathSeparator + sValue) And 16) >0 Then + ' Get the directories + sDir = sDir & chr(13) & sValue + End If + End If + sValue = Dir$ + Loop Until sValue = "" + MsgBox sDir,0,sPath End Sub diff --git a/source/text/sbasic/shared/03020405.xhp b/source/text/sbasic/shared/03020405.xhp index 7ba12d5fb2..5ed9668115 100644 --- a/source/text/sbasic/shared/03020405.xhp +++ b/source/text/sbasic/shared/03020405.xhp @@ -69,13 +69,13 @@ Dim iNumber As Integer Dim sLine As String Dim aFile As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "This is a line of text" - MsgBox FileAttr(#iNumber, 1 ),0,"Access mode" - MsgBox FileAttr(#iNumber, 2 ),0,"File attribute" - Close #iNumber + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "This is a line of text" + MsgBox FileAttr(#iNumber, 1 ),0,"Access mode" + MsgBox FileAttr(#iNumber, 2 ),0,"File attribute" + Close #iNumber End Sub diff --git a/source/text/sbasic/shared/03020406.xhp b/source/text/sbasic/shared/03020406.xhp index 2eed4e72ed..c4cd0e3957 100644 --- a/source/text/sbasic/shared/03020406.xhp +++ b/source/text/sbasic/shared/03020406.xhp @@ -54,7 +54,7 @@ Example: Sub ExampleFileCopy - FileCopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav" + FileCopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav" End Sub diff --git a/source/text/sbasic/shared/03020407.xhp b/source/text/sbasic/shared/03020407.xhp index 006526e88e..ea4b8c4306 100644 --- a/source/text/sbasic/shared/03020407.xhp +++ b/source/text/sbasic/shared/03020407.xhp @@ -53,7 +53,7 @@ Example: Sub ExampleFileDateTime - MsgBox FileDateTime("C:\autoexec.bat") + MsgBox FileDateTime("C:\autoexec.bat") End Sub diff --git a/source/text/sbasic/shared/03020408.xhp b/source/text/sbasic/shared/03020408.xhp index 19bbe70e0f..414b5620cc 100644 --- a/source/text/sbasic/shared/03020408.xhp +++ b/source/text/sbasic/shared/03020408.xhp @@ -55,7 +55,7 @@ Example: Sub ExampleFileLen - MsgBox FileLen("C:\autoexec.bat") + MsgBox FileLen("C:\autoexec.bat") End Sub diff --git a/source/text/sbasic/shared/03020409.xhp b/source/text/sbasic/shared/03020409.xhp index 2c964198af..a26b96530e 100644 --- a/source/text/sbasic/shared/03020409.xhp +++ b/source/text/sbasic/shared/03020409.xhp @@ -65,16 +65,16 @@ Sub ExampleSetGetAttr On Error GoTo ErrorHandler ' Define target for error handler - If Dir("C:\test",16)="" Then MkDir "C:\test" - If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" - SetAttr "c:\test\autoexec.sav" ,0 - FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" - SetAttr "c:\test\autoexec.sav" ,1 - Print GetAttr( "c:\test\autoexec.sav" ) - End + If Dir("C:\test",16)="" Then MkDir "C:\test" + If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" + SetAttr "c:\test\autoexec.sav" ,0 + FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" + SetAttr "c:\test\autoexec.sav" ,1 + Print GetAttr( "c:\test\autoexec.sav" ) + End ErrorHandler: - Print Error - End + Print Error + End End Sub diff --git a/source/text/sbasic/shared/03020410.xhp b/source/text/sbasic/shared/03020410.xhp index 4619a07365..60d247210c 100644 --- a/source/text/sbasic/shared/03020410.xhp +++ b/source/text/sbasic/shared/03020410.xhp @@ -52,7 +52,7 @@ Example: Sub ExampleKill - Kill "C:\datafile.dat" ' File must be created in advance + Kill "C:\datafile.dat" ' File must be created in advance End Sub diff --git a/source/text/sbasic/shared/03020411.xhp b/source/text/sbasic/shared/03020411.xhp index a4f7879087..378a4a4443 100644 --- a/source/text/sbasic/shared/03020411.xhp +++ b/source/text/sbasic/shared/03020411.xhp @@ -60,40 +60,40 @@ Const sFile2 As String = "Copied.tmp" Const sFile3 As String = "Renamed.tmp" Dim sFile As String - sFile = sDir1 + "/" + sSubDir1 - ChDir( sDir1 ) - If Dir(sSubDir1,16)="" Then ' Does the directory exist? - MkDir sSubDir1 - MsgBox sFile,0,"Create directory" - End If - sFile = sFile + "/" + sFile2 - FileCopy sFile1 , sFile - MsgBox fSysURL(CurDir()),0,"Current directory" - MsgBox sFile & Chr(13) & FileDateTime( sFile ),0,"Creation time" - MsgBox sFile & Chr(13)& FileLen( sFile ),0,"File length" - MsgBox sFile & Chr(13)& GetAttr( sFile ),0,"File attributes" - Name sFile As sDir1 + "/" + sSubDir1 + "/" + sFile3 - ' Rename in the same directory - sFile = sDir1 + "/" + sSubDir1 + "/" + sFile3 - SetAttr( sFile, 0 ) 'Delete all attributes - MsgBox sFile & Chr(13) & GetAttr( sFile ),0,"New file attributes" - Kill sFile - RmDir sDir1 + "/" + sSubDir1 + sFile = sDir1 + "/" + sSubDir1 + ChDir( sDir1 ) + If Dir(sSubDir1,16)="" Then ' Does the directory exist? + MkDir sSubDir1 + MsgBox sFile,0,"Create directory" + End If + sFile = sFile + "/" + sFile2 + FileCopy sFile1 , sFile + MsgBox fSysURL(CurDir()),0,"Current directory" + MsgBox sFile & Chr(13) & FileDateTime( sFile ),0,"Creation time" + MsgBox sFile & Chr(13)& FileLen( sFile ),0,"File length" + MsgBox sFile & Chr(13)& GetAttr( sFile ),0,"File attributes" + Name sFile As sDir1 + "/" + sSubDir1 + "/" + sFile3 + ' Rename in the same directory + sFile = sDir1 + "/" + sSubDir1 + "/" + sFile3 + SetAttr( sFile, 0 ) 'Delete all attributes + MsgBox sFile & Chr(13) & GetAttr( sFile ),0,"New file attributes" + Kill sFile + RmDir sDir1 + "/" + sSubDir1 End Sub ' Converts a system path in URL Function fSysURL( fSysFp As String ) As String Dim iPos As String - iPos = 1 - iPos = Instr(iPos,fSysFp, getPathSeparator()) - Do While iPos > 0 - Mid( fSysFp, iPos , 1,"/") - iPos = Instr(iPos+1,fSysFp, getPathSeparator()) - Loop - ' the colon with DOS - iPos = Instr(1,fSysFp,":") - If iPos > 0 Then Mid( fSysFp, iPos , 1,"|") - fSysURL = "file://" & fSysFp + iPos = 1 + iPos = Instr(iPos,fSysFp, getPathSeparator()) + Do While iPos > 0 + Mid( fSysFp, iPos , 1,"/") + iPos = Instr(iPos+1,fSysFp, getPathSeparator()) + Loop + ' the colon with DOS + iPos = Instr(1,fSysFp,":") + If iPos > 0 Then Mid( fSysFp, iPos , 1,"|") + fSysURL = "file://" & fSysFp End Function diff --git a/source/text/sbasic/shared/03020412.xhp b/source/text/sbasic/shared/03020412.xhp index 1d5f6eeb47..afef3e8516 100644 --- a/source/text/sbasic/shared/03020412.xhp +++ b/source/text/sbasic/shared/03020412.xhp @@ -55,7 +55,7 @@ End Error: If err = 58 Then - MsgBox "File already exists" + MsgBox "File already exists" End If End End Sub diff --git a/source/text/sbasic/shared/03020413.xhp b/source/text/sbasic/shared/03020413.xhp index 13005273ed..75505b9432 100644 --- a/source/text/sbasic/shared/03020413.xhp +++ b/source/text/sbasic/shared/03020413.xhp @@ -53,11 +53,11 @@ Example: Sub ExampleRmDir - MkDir "C:\Test2" - ChDir "C:\test2" - MsgBox Curdir - ChDir "\" - RmDir "C:\test2" + MkDir "C:\Test2" + ChDir "C:\test2" + MsgBox Curdir + ChDir "\" + RmDir "C:\test2" End Sub diff --git a/source/text/sbasic/shared/03020414.xhp b/source/text/sbasic/shared/03020414.xhp index 5c2af47a09..f7296ea162 100644 --- a/source/text/sbasic/shared/03020414.xhp +++ b/source/text/sbasic/shared/03020414.xhp @@ -59,17 +59,17 @@ Example: Sub ExampleSetGetAttr - On Error GoTo ErrorHandler ' Define target for error handler - If Dir("C:\test",16)="" Then MkDir "C:\test" - If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" - SetAttr "c:\test\autoexec.sav" ,0 - FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" - SetAttr "c:\test\autoexec.sav" ,1 - Print GetAttr( "c:\test\autoexec.sav" ) - End + On Error GoTo ErrorHandler ' Define target for error handler + If Dir("C:\test",16)="" Then MkDir "C:\test" + If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" + SetAttr "c:\test\autoexec.sav" ,0 + FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav" + SetAttr "c:\test\autoexec.sav" ,1 + Print GetAttr( "c:\test\autoexec.sav" ) + End ErrorHandler: - Print Error - End + Print Error + End End Sub diff --git a/source/text/sbasic/shared/03020415.xhp b/source/text/sbasic/shared/03020415.xhp index 7cf25dbcf8..5109b9b552 100644 --- a/source/text/sbasic/shared/03020415.xhp +++ b/source/text/sbasic/shared/03020415.xhp @@ -54,9 +54,9 @@ Example: Sub ExampleFileExists - MsgBox FileExists("C:\autoexec.bat") - MsgBox FileExists("file:///d|/bookmark.htm") - MsgBox FileExists("file:///d|/Private") + MsgBox FileExists("C:\autoexec.bat") + MsgBox FileExists("file:///d|/bookmark.htm") + MsgBox FileExists("file:///d|/Private") End Sub diff --git a/source/text/sbasic/shared/03030107.xhp b/source/text/sbasic/shared/03030107.xhp index 2250e9c7b9..920a5283de 100644 --- a/source/text/sbasic/shared/03030107.xhp +++ b/source/text/sbasic/shared/03030107.xhp @@ -54,7 +54,7 @@ Example: Sub ExampleCDateToIso - MsgBox "" & CDateToIso(Now) ,64,"ISO Date" + MsgBox "" & CDateToIso(Now) ,64,"ISO Date" End Sub diff --git a/source/text/sbasic/shared/03030110.xhp b/source/text/sbasic/shared/03030110.xhp index 0c8eb26a5c..887b2ee4db 100644 --- a/source/text/sbasic/shared/03030110.xhp +++ b/source/text/sbasic/shared/03030110.xhp @@ -149,7 +149,7 @@ Example: Sub example_dateadd - MsgBox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005") + MsgBox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005") End Sub diff --git a/source/text/sbasic/shared/03030111.xhp b/source/text/sbasic/shared/03030111.xhp index c3a41d2e03..502e7f54cd 100644 --- a/source/text/sbasic/shared/03030111.xhp +++ b/source/text/sbasic/shared/03030111.xhp @@ -54,8 +54,8 @@ Example: Sub ExampleCDateToUnoDate - aDatabaseRow.updateDate(3, CDateToUnoDate(Now)) - aDateControl.Date = CDateToUnoDate(Now) + aDatabaseRow.updateDate(3, CDateToUnoDate(Now)) + aDateControl.Date = CDateToUnoDate(Now) End Sub diff --git a/source/text/sbasic/shared/03030112.xhp b/source/text/sbasic/shared/03030112.xhp index 2f7ab2b0c0..ed4653aac4 100644 --- a/source/text/sbasic/shared/03030112.xhp +++ b/source/text/sbasic/shared/03030112.xhp @@ -54,8 +54,8 @@ Example: Sub ExampleCDateFromUnoDate - MsgBox(CDateFromUnoDate(aDatabaseRow.getDate(3))) - MsgBox(CDateFromUnoDate(aDateControl.Date)) + MsgBox(CDateFromUnoDate(aDatabaseRow.getDate(3))) + MsgBox(CDateFromUnoDate(aDateControl.Date)) End Sub diff --git a/source/text/sbasic/shared/03030113.xhp b/source/text/sbasic/shared/03030113.xhp index 01fb7f6cfc..62a5554623 100644 --- a/source/text/sbasic/shared/03030113.xhp +++ b/source/text/sbasic/shared/03030113.xhp @@ -54,8 +54,8 @@ Example: Sub ExampleCDateToUnoTime - aDatabaseRow.updateTime(3, CDateToUnoTime(Now)) - aTimeControl.Time = CDateToUnoTime(Now) + aDatabaseRow.updateTime(3, CDateToUnoTime(Now)) + aTimeControl.Time = CDateToUnoTime(Now) End Sub diff --git a/source/text/sbasic/shared/03030114.xhp b/source/text/sbasic/shared/03030114.xhp index 4ead4152ca..3bfcb26b8f 100644 --- a/source/text/sbasic/shared/03030114.xhp +++ b/source/text/sbasic/shared/03030114.xhp @@ -54,8 +54,8 @@ Example: Sub ExampleCDateFromUnoTime - MsgBox(CDateFromUnoTime(aDatabaseRow.getTime(3))) - MsgBox(CDateFromUnoTime(aTimeControl.Time)) + MsgBox(CDateFromUnoTime(aDatabaseRow.getTime(3))) + MsgBox(CDateFromUnoTime(aTimeControl.Time)) End Sub diff --git a/source/text/sbasic/shared/03030115.xhp b/source/text/sbasic/shared/03030115.xhp index d6f515272a..13f6d0aa54 100644 --- a/source/text/sbasic/shared/03030115.xhp +++ b/source/text/sbasic/shared/03030115.xhp @@ -54,7 +54,7 @@ Example: Sub ExampleCDateToUnoDateTime - aDatabaseRow.updateTimestamp(3, CDateToUnoDateTime(Now)) + aDatabaseRow.updateTimestamp(3, CDateToUnoDateTime(Now)) End Sub diff --git a/source/text/sbasic/shared/03030116.xhp b/source/text/sbasic/shared/03030116.xhp index 2b7034b1ef..ea9a96965b 100644 --- a/source/text/sbasic/shared/03030116.xhp +++ b/source/text/sbasic/shared/03030116.xhp @@ -54,7 +54,7 @@ Example: Sub ExampleCDateFromUnoDateTime - MsgBox(CDateFromUnoDateTime(aDatabaseRow.getTimestamp(3))) + MsgBox(CDateFromUnoDateTime(aDatabaseRow.getTimestamp(3))) End Sub diff --git a/source/text/sbasic/shared/03030120.xhp b/source/text/sbasic/shared/03030120.xhp index a5370e9c7c..5bd3db6e25 100644 --- a/source/text/sbasic/shared/03030120.xhp +++ b/source/text/sbasic/shared/03030120.xhp @@ -179,7 +179,7 @@ Example: Sub example_datediff - MsgBox DateDiff("d", "1/1/2005", "12/31/2005") + MsgBox DateDiff("d", "1/1/2005", "12/31/2005") End Sub diff --git a/source/text/sbasic/shared/03030130.xhp b/source/text/sbasic/shared/03030130.xhp index ce2fe07685..5eccea4a19 100644 --- a/source/text/sbasic/shared/03030130.xhp +++ b/source/text/sbasic/shared/03030130.xhp @@ -55,7 +55,7 @@ Example: Sub example_datepart - MsgBox DatePart("ww", "12/31/2005") + MsgBox DatePart("ww", "12/31/2005") End Sub diff --git a/source/text/sbasic/shared/03030203.xhp b/source/text/sbasic/shared/03030203.xhp index 08d7d1518d..07bdde963a 100644 --- a/source/text/sbasic/shared/03030203.xhp +++ b/source/text/sbasic/shared/03030203.xhp @@ -49,7 +49,7 @@ Example: Sub ExampleNow - MsgBox "It is now " & Now + MsgBox "It is now " & Now End Sub diff --git a/source/text/sbasic/shared/03030204.xhp b/source/text/sbasic/shared/03030204.xhp index c29e5e4223..6028b6e457 100644 --- a/source/text/sbasic/shared/03030204.xhp +++ b/source/text/sbasic/shared/03030204.xhp @@ -57,7 +57,7 @@ Example: Sub ExampleSecond - MsgBox "The exact second of the current time is "& Second( Now ) + MsgBox "The exact second of the current time is "& Second( Now ) End Sub diff --git a/source/text/sbasic/shared/03030205.xhp b/source/text/sbasic/shared/03030205.xhp index b6bfd54da2..978366b0b3 100644 --- a/source/text/sbasic/shared/03030205.xhp +++ b/source/text/sbasic/shared/03030205.xhp @@ -65,10 +65,10 @@ Sub ExampleTimeSerial Dim dDate As Double, sDate As String - dDate = TimeSerial(8,30,15) - sDate = TimeSerial(8,30,15) - MsgBox dDate,64,"Time as a number" - MsgBox sDate,64,"Formatted time" + dDate = TimeSerial(8,30,15) + sDate = TimeSerial(8,30,15) + MsgBox dDate,64,"Time as a number" + MsgBox sDate,64,"Formatted time" End Sub diff --git a/source/text/sbasic/shared/03030206.xhp b/source/text/sbasic/shared/03030206.xhp index b0702c59c4..e76797fab5 100644 --- a/source/text/sbasic/shared/03030206.xhp +++ b/source/text/sbasic/shared/03030206.xhp @@ -61,16 +61,16 @@ Sub ExampleTimerValue Dim daDT As Date Dim a1, b1, c1, a2, b2, c2 As String - a1 = "start time" - b1 = "end time" - c1 = "total time" - a2 = "8:34" - b2 = "18:12" - daDT = TimeValue(b2) - TimeValue(a2) - c2 = a1 & ": " & a2 & chr(13) - c2 = c2 & b1 & ": " & b2 & chr(13) - c2 = c2 & c1 & ": " & trim(Str(Hour(daDT))) & ":" & trim(Str(Minute(daDT))) & ":" & trim(Str(Second(daDT))) - MsgBox c2 + a1 = "start time" + b1 = "end time" + c1 = "total time" + a2 = "8:34" + b2 = "18:12" + daDT = TimeValue(b2) - TimeValue(a2) + c2 = a1 & ": " & a2 & chr(13) + c2 = c2 & b1 & ": " & b2 & chr(13) + c2 = c2 & c1 & ": " & trim(Str(Hour(daDT))) & ":" & trim(Str(Minute(daDT))) & ":" & trim(Str(Second(daDT))) + MsgBox c2 End Sub diff --git a/source/text/sbasic/shared/03030301.xhp b/source/text/sbasic/shared/03030301.xhp index 5cae236ba6..d59592baeb 100644 --- a/source/text/sbasic/shared/03030301.xhp +++ b/source/text/sbasic/shared/03030301.xhp @@ -49,7 +49,7 @@ Example: Sub ExampleDate - MsgBox "The date is " & Date + MsgBox "The date is " & Date End Sub diff --git a/source/text/sbasic/shared/03030302.xhp b/source/text/sbasic/shared/03030302.xhp index 01aed5d830..410d2acff2 100644 --- a/source/text/sbasic/shared/03030302.xhp +++ b/source/text/sbasic/shared/03030302.xhp @@ -49,7 +49,7 @@ Example: Sub ExampleTime - MsgBox Time,0,"The time is" + MsgBox Time,0,"The time is" End Sub diff --git a/source/text/sbasic/shared/03030303.xhp b/source/text/sbasic/shared/03030303.xhp index 9c87d2f0cf..bf440cf919 100644 --- a/source/text/sbasic/shared/03030303.xhp +++ b/source/text/sbasic/shared/03030303.xhp @@ -51,13 +51,13 @@ Sub ExampleTimer Dim lSec As Long,lMin As Long,lHour As Long - lSec = Timer - MsgBox lSec,0,"Seconds since midnight" - lMin = lSec / 60 - lSec = lSec Mod 60 - lHour = lMin / 60 - lMin = lMin Mod 60 - MsgBox Right("00" & lHour , 2) & ":"& Right("00" & lMin , 2) & ":" & Right("00" & lSec , 2) ,0,"The time is" + lSec = Timer + MsgBox lSec,0,"Seconds since midnight" + lMin = lSec / 60 + lSec = lSec Mod 60 + lHour = lMin / 60 + lMin = lMin Mod 60 + MsgBox Right("00" & lHour , 2) & ":"& Right("00" & lMin , 2) & ":" & Right("00" & lSec , 2) ,0,"The time is" End Sub diff --git a/source/text/sbasic/shared/03050100.xhp b/source/text/sbasic/shared/03050100.xhp index e8784b6fb3..7ae49da66b 100644 --- a/source/text/sbasic/shared/03050100.xhp +++ b/source/text/sbasic/shared/03050100.xhp @@ -56,13 +56,13 @@ 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 + 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" + MsgBox "Error " & err & ": " & Error$ + chr(13) + "In Line : " + Erl + chr(13) + Now , 16 ,"An error occurred" End Sub diff --git a/source/text/sbasic/shared/03050500.xhp b/source/text/sbasic/shared/03050500.xhp index 1b1c216b5e..855128baa9 100644 --- a/source/text/sbasic/shared/03050500.xhp +++ b/source/text/sbasic/shared/03050500.xhp @@ -59,24 +59,24 @@ Dim iCount As Integer Dim sLine As String Dim aFile As String - aFile = "c:\data.txt" - iNumber = Freefile - Open aFile For Output As #iNumber - Print #iNumber, "This is a 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 + aFile = "c:\data.txt" + iNumber = Freefile + Open aFile For Output As #iNumber + Print #iNumber, "This is a 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" + Reset + MsgBox "All files will be closed",0,"Error" End Sub diff --git a/source/text/sbasic/shared/03060100.xhp b/source/text/sbasic/shared/03060100.xhp index b0ff824db4..440447a175 100644 --- a/source/text/sbasic/shared/03060100.xhp +++ b/source/text/sbasic/shared/03060100.xhp @@ -55,12 +55,12 @@ Sub ExampleAnd Dim A As Variant, B As Variant, C As Variant, D As Variant Dim vVarOut As Variant - A = 10: B = 8: C = 6: D = Null - vVarOut = A > B And B > C ' returns -1 - vVarOut = B > A And B > C ' returns 0 - vVarOut = A > B And B > D ' returns 0 - vVarOut = (B > D And B > A) ' returns 0 - vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments + A = 10: B = 8: C = 6: D = Null + vVarOut = A > B And B > C ' returns -1 + vVarOut = B > A And B > C ' returns 0 + vVarOut = A > B And B > D ' returns 0 + vVarOut = (B > D And B > A) ' returns 0 + vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments End Sub diff --git a/source/text/sbasic/shared/03060200.xhp b/source/text/sbasic/shared/03060200.xhp index bdfeb0bfad..2076c1d9d3 100644 --- a/source/text/sbasic/shared/03060200.xhp +++ b/source/text/sbasic/shared/03060200.xhp @@ -54,12 +54,12 @@ Sub ExampleEqv Dim A As Variant, B As Variant, C As Variant, D As Variantsee #i38265 Dim vOut As Variant - A = 10: B = 8: C = 6: D = Null - vOut = A > B Eqv B > C ' returns -1 - vOut = B > A Eqv B > C ' returns 0 - vOut = A > B Eqv B > D ' returns 0 - vOut = (B > D Eqv B > A) ' returns -1 - vOut = B Eqv A ' returns -3 + A = 10: B = 8: C = 6: D = Null + vOut = A > B Eqv B > C ' returns -1 + vOut = B > A Eqv B > C ' returns 0 + vOut = A > B Eqv B > D ' returns 0 + vOut = (B > D Eqv B > A) ' returns -1 + vOut = B Eqv A ' returns -3 End Sub diff --git a/source/text/sbasic/shared/03060300.xhp b/source/text/sbasic/shared/03060300.xhp index 33ade16895..9585b5be94 100644 --- a/source/text/sbasic/shared/03060300.xhp +++ b/source/text/sbasic/shared/03060300.xhp @@ -54,12 +54,12 @@ Sub ExampleImp Dim A As Variant, B As Variant, C As Variant, D As Variant Dim vOut As Variant - A = 10: B = 8: C = 6: D = Null - vOut = A > B Imp B > C ' returns -1 - vOut = B > A Imp B > C ' returns -1 - vOut = A > B Imp B > D ' returns 0 - vOut = (B > D Imp B > A) ' returns -1 - vOut = B Imp A ' returns -1 + A = 10: B = 8: C = 6: D = Null + vOut = A > B Imp B > C ' returns -1 + vOut = B > A Imp B > C ' returns -1 + vOut = A > B Imp B > D ' returns 0 + vOut = (B > D Imp B > A) ' returns -1 + vOut = B Imp A ' returns -1 End Sub diff --git a/source/text/sbasic/shared/03060400.xhp b/source/text/sbasic/shared/03060400.xhp index 224c75213d..aa4eea7686 100644 --- a/source/text/sbasic/shared/03060400.xhp +++ b/source/text/sbasic/shared/03060400.xhp @@ -54,11 +54,11 @@ Sub ExampleNot Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant Dim vOut As Variant - vA = 10: vB = 8: vC = 6: vD = Null - vOut = Not vA ' Returns -11 - vOut = Not(vC > vD) ' Returns -1 - vOut = Not(vB > vA) ' Returns -1 - vOut = Not(vA > vB) ' Returns 0 + vA = 10: vB = 8: vC = 6: vD = Null + vOut = Not vA ' Returns -11 + vOut = Not(vC > vD) ' Returns -1 + vOut = Not(vB > vA) ' Returns -1 + vOut = Not(vA > vB) ' Returns 0 End Sub diff --git a/source/text/sbasic/shared/03060500.xhp b/source/text/sbasic/shared/03060500.xhp index 7d4b7e685e..d35a59abc0 100644 --- a/source/text/sbasic/shared/03060500.xhp +++ b/source/text/sbasic/shared/03060500.xhp @@ -54,12 +54,12 @@ Sub ExampleOr Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant Dim vOut As Variant - vA = 10: vB = 8: vC = 6: vD = Null - vOut = vA > vB Or vB > vC ' -1 - vOut = vB > vA Or vB > vC ' -1 - vOut = vA > vB Or vB > vD ' -1 - vOut = (vB > vD Or vB > vA) ' 0 - vOut = vB Or vA ' 10 + vA = 10: vB = 8: vC = 6: vD = Null + vOut = vA > vB Or vB > vC ' -1 + vOut = vB > vA Or vB > vC ' -1 + vOut = vA > vB Or vB > vD ' -1 + vOut = (vB > vD Or vB > vA) ' 0 + vOut = vB Or vA ' 10 End Sub diff --git a/source/text/sbasic/shared/03060600.xhp b/source/text/sbasic/shared/03060600.xhp index 5cae45ea68..495d679f20 100644 --- a/source/text/sbasic/shared/03060600.xhp +++ b/source/text/sbasic/shared/03060600.xhp @@ -54,12 +54,12 @@ Sub ExampleXor Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant Dim vOut As Variant - vA = 10: vB = 8: vC = 6: vD = Null - vOut = vA > vB Xor vB > vC ' returns 0 - vOut = vB > vA Xor vB > vC ' returns -1 - vOut = vA > vB Xor vB > vD ' returns -1 - vOut = (vB > vD Xor vB > vA) ' returns 0 - vOut = vB Xor vA ' returns 2 + vA = 10: vB = 8: vC = 6: vD = Null + vOut = vA > vB Xor vB > vC ' returns 0 + vOut = vB > vA Xor vB > vC ' returns -1 + vOut = vA > vB Xor vB > vD ' returns -1 + vOut = (vB > vD Xor vB > vA) ' returns 0 + vOut = vB Xor vA ' returns 2 End Sub diff --git a/source/text/sbasic/shared/03070100.xhp b/source/text/sbasic/shared/03070100.xhp index 9b3245034b..1218531af6 100644 --- a/source/text/sbasic/shared/03070100.xhp +++ b/source/text/sbasic/shared/03070100.xhp @@ -50,15 +50,15 @@ Example: Sub ExampleSubtraction1 - Print 5 - 5 + Print 5 - 5 End Sub Sub ExampleSubtraction2 Dim iValue1 As Integer Dim iValue2 As Integer - iValue1 = 5 - iValue2 = 10 - Print iValue1 - iValue2 + iValue1 = 5 + iValue2 = 10 + Print iValue1 - iValue2 End Sub diff --git a/source/text/sbasic/shared/03070200.xhp b/source/text/sbasic/shared/03070200.xhp index b26623a564..f5959f7fb2 100644 --- a/source/text/sbasic/shared/03070200.xhp +++ b/source/text/sbasic/shared/03070200.xhp @@ -50,15 +50,15 @@ Example: Sub ExampleMultiplication1 - Print 5 * 5 + Print 5 * 5 End Sub Sub ExampleMultiplication2 Dim iValue1 As Integer Dim iValue2 As Integer - iValue1 = 5 - iValue2 = 10 - Print iValue1 * iValue2 + iValue1 = 5 + iValue2 = 10 + Print iValue1 * iValue2 End Sub diff --git a/source/text/sbasic/shared/03070300.xhp b/source/text/sbasic/shared/03070300.xhp index 0d2e722bc9..ccceb10f0b 100644 --- a/source/text/sbasic/shared/03070300.xhp +++ b/source/text/sbasic/shared/03070300.xhp @@ -50,15 +50,15 @@ Example: Sub ExampleAddition1 - Print 5 + 5 + Print 5 + 5 End Sub Sub ExampleAddition2 Dim iValue1 As Integer Dim iValue2 As Integer - iValue1 = 5 - iValue2 = 10 - Print iValue1 + iValue2 + iValue1 = 5 + iValue2 = 10 + Print iValue1 + iValue2 End Sub diff --git a/source/text/sbasic/shared/03070400.xhp b/source/text/sbasic/shared/03070400.xhp index 308aee3d74..b5231f93c2 100644 --- a/source/text/sbasic/shared/03070400.xhp +++ b/source/text/sbasic/shared/03070400.xhp @@ -50,15 +50,15 @@ Example: Sub ExampleDivision1 - Print 5 / 5 + Print 5 / 5 End Sub Sub ExampleDivision2 Dim iValue1 As Integer Dim iValue2 As Integer - iValue1 = 5 - iValue2 = 10 - Print iValue1 / iValue2 + iValue1 = 5 + iValue2 = 10 + Print iValue1 / iValue2 End Sub diff --git a/source/text/sbasic/shared/03070500.xhp b/source/text/sbasic/shared/03070500.xhp index a5d5c753bf..3f73ba06fe 100644 --- a/source/text/sbasic/shared/03070500.xhp +++ b/source/text/sbasic/shared/03070500.xhp @@ -51,8 +51,8 @@ Example: Sub Example - Print ( 12.345 ^ 23 ) - Print Exp ( 23 * Log( 12.345 ) ) ' Raises by forming a logarithm + Print ( 12.345 ^ 23 ) + Print Exp ( 23 * Log( 12.345 ) ) ' Raises by forming a logarithm End Sub diff --git a/source/text/sbasic/shared/03070600.xhp b/source/text/sbasic/shared/03070600.xhp index d7b0bbe26b..ddb9f3f9d2 100644 --- a/source/text/sbasic/shared/03070600.xhp +++ b/source/text/sbasic/shared/03070600.xhp @@ -53,12 +53,12 @@ Example: Sub ExampleMod - Print 10 Mod 2.5 ' returns 0 - Print 10 / 2.5 ' returns 4 - Print 10 Mod 5 ' returns 0 - Print 10 / 5 ' returns 2 - Print 5 Mod 10 ' returns 5 - Print 5 / 10 ' returns 0.5 + Print 10 Mod 2.5 ' returns 0 + Print 10 / 2.5 ' returns 4 + Print 10 Mod 5 ' returns 0 + Print 10 / 5 ' returns 2 + Print 5 Mod 10 ' returns 5 + Print 5 / 10 ' returns 0.5 End Sub diff --git a/source/text/sbasic/shared/03080101.xhp b/source/text/sbasic/shared/03080101.xhp index d09f59bea3..cf76f9d0f7 100644 --- a/source/text/sbasic/shared/03080101.xhp +++ b/source/text/sbasic/shared/03080101.xhp @@ -65,9 +65,9 @@ ' rounded Pi = 3.14159 Is a predefined constant Dim d1 As Double Dim d2 As Double - d1 = InputBox("Enter the length of the side adjacent to the angle: ","Adjacent") - d2 = InputBox("Enter the length of the side opposite the angle: ","Opposite") - Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees" + d1 = InputBox("Enter the length of the side adjacent to the angle: ","Adjacent") + d2 = InputBox("Enter the length of the side opposite the angle: ","Opposite") + Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees" End Sub diff --git a/source/text/sbasic/shared/03080102.xhp b/source/text/sbasic/shared/03080102.xhp index db293cfcbe..d625f684ff 100644 --- a/source/text/sbasic/shared/03080102.xhp +++ b/source/text/sbasic/shared/03080102.xhp @@ -64,9 +64,9 @@ Sub ExampleCosinus ' rounded Pi = 3.14159 Dim d1 As Double, dAngle As Double - d1 = InputBox("Enter the length of the adjacent side: ","Adjacent") - dAngle = InputBox("Enter the angle Alpha (in degrees): ","Alpha") - Print "The length of the hypothenuse is"; (d1 / cos (dAngle * Pi / 180)) + d1 = InputBox("Enter the length of the adjacent side: ","Adjacent") + dAngle = InputBox("Enter the angle Alpha (in degrees): ","Alpha") + Print "The length of the hypothenuse is"; (d1 / cos (dAngle * Pi / 180)) End Sub diff --git a/source/text/sbasic/shared/03080103.xhp b/source/text/sbasic/shared/03080103.xhp index 8115b56240..b7996ccf60 100644 --- a/source/text/sbasic/shared/03080103.xhp +++ b/source/text/sbasic/shared/03080103.xhp @@ -65,9 +65,9 @@ ' Pi = 3.1415926 is a predefined variable Dim d1 As Double Dim dAlpha As Double - d1 = InputBox("Enter the length of the opposite side: ","Opposite Side") - dAlpha = InputBox("Enter the angle Alpha (in degrees): ","Alpha") - Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180)) + d1 = InputBox("Enter the length of the opposite side: ","Opposite Side") + dAlpha = InputBox("Enter the angle Alpha (in degrees): ","Alpha") + Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180)) End Sub diff --git a/source/text/sbasic/shared/03080104.xhp b/source/text/sbasic/shared/03080104.xhp index bb5688964f..20d43064b4 100644 --- a/source/text/sbasic/shared/03080104.xhp +++ b/source/text/sbasic/shared/03080104.xhp @@ -65,9 +65,9 @@ ' Pi = 3.1415926 is a pre-defined variable Dim d1 As Double Dim dAlpha As Double - d1 = InputBox("Enter the length of the side opposite the angle: ","opposite") - dAlpha = InputBox("Enter the Alpha angle (in degrees): ","Alpha") - Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180)) + d1 = InputBox("Enter the length of the side opposite the angle: ","opposite") + dAlpha = InputBox("Enter the Alpha angle (in degrees): ","Alpha") + Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180)) End Sub diff --git a/source/text/sbasic/shared/03080201.xhp b/source/text/sbasic/shared/03080201.xhp index 1e58b3f761..f596a004fe 100644 --- a/source/text/sbasic/shared/03080201.xhp +++ b/source/text/sbasic/shared/03080201.xhp @@ -55,10 +55,10 @@ Sub ExampleLogExp Dim dValue As Double - Const b1=12.345e12 + Const b1=12.345e12 Const b2=1.345e34 - dValue=Exp( Log(b1)+Log(b2) ) - MsgBox "" & dValue & chr(13) & (b1*b2) ,0,"Multiplication by logarithm" + dValue=Exp( Log(b1)+Log(b2) ) + MsgBox "" & dValue & chr(13) & (b1*b2) ,0,"Multiplication by logarithm" End Sub diff --git a/source/text/sbasic/shared/03080202.xhp b/source/text/sbasic/shared/03080202.xhp index ff3872cdb9..e9a9579993 100644 --- a/source/text/sbasic/shared/03080202.xhp +++ b/source/text/sbasic/shared/03080202.xhp @@ -60,8 +60,8 @@ Dim a As Double Dim Const b1=12.345e12 Dim Const b2=1.345e34 - a=Exp( Log(b1)+Log(b2) ) - MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function" + a=Exp( Log(b1)+Log(b2) ) + MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function" End Sub diff --git a/source/text/sbasic/shared/03080301.xhp b/source/text/sbasic/shared/03080301.xhp index e52e586b0f..4360f72cf5 100644 --- a/source/text/sbasic/shared/03080301.xhp +++ b/source/text/sbasic/shared/03080301.xhp @@ -54,16 +54,16 @@ Sub ExampleRandomize Dim iCount As Integer, iVar As Integer, sText As String Dim iSpectral(10) As Integer - Randomize 2^14-1 - For iCount = 1 To 1000 - iVar = Int(10 * Rnd) ' Range from 0 to 9 - iSpectral(iVar) = iSpectral(iVar) +1 - Next iCount - sText = " | " - For iCount = 0 To 9 - sText = sText & iSpectral(iCount) & " | " - Next iCount - MsgBox sText,0,"Spectral Distribution" + Randomize 2^14-1 + For iCount = 1 To 1000 + iVar = Int(10 * Rnd) ' Range from 0 to 9 + iSpectral(iVar) = iSpectral(iVar) +1 + Next iCount + sText = " | " + For iCount = 0 To 9 + sText = sText & iSpectral(iCount) & " | " + Next iCount + MsgBox sText,0,"Spectral Distribution" End Sub
diff --git a/source/text/sbasic/shared/03080302.xhp b/source/text/sbasic/shared/03080302.xhp index 16e93d95ab..e01abfeb29 100644 --- a/source/text/sbasic/shared/03080302.xhp +++ b/source/text/sbasic/shared/03080302.xhp @@ -55,17 +55,17 @@ Sub ExampleRandomSelect Dim iVar As Integer - iVar = Int((15 * Rnd) -2) - Select Case iVar - Case 1 To 5 - Print "Number from 1 to 5" - Case 6, 7, 8 - Print "Number from 6 to 8" - Case Is > 8 And iVar < 11 - Print "Greater than 8" - Case Else - Print "Outside range 1 to 10" - End Select + iVar = Int((15 * Rnd) -2) + Select Case iVar + Case 1 To 5 + Print "Number from 1 to 5" + Case 6, 7, 8 + Print "Number from 6 to 8" + Case Is > 8 And iVar < 11 + Print "Greater than 8" + Case Else + Print "Outside range 1 to 10" + End Select End Sub
diff --git a/source/text/sbasic/shared/03080401.xhp b/source/text/sbasic/shared/03080401.xhp index 2dd53e2272..58d6cf6661 100644 --- a/source/text/sbasic/shared/03080401.xhp +++ b/source/text/sbasic/shared/03080401.xhp @@ -56,8 +56,8 @@ Sub ExampleSqr Dim iVar As Single - iVar = 36 - MsgBox Sqr(iVar) + iVar = 36 + MsgBox Sqr(iVar) End Sub diff --git a/source/text/sbasic/shared/03080501.xhp b/source/text/sbasic/shared/03080501.xhp index 986454b855..e95a4871e2 100644 --- a/source/text/sbasic/shared/03080501.xhp +++ b/source/text/sbasic/shared/03080501.xhp @@ -54,9 +54,9 @@ Example: Sub ExampleFix - Print Fix(3.14159) ' returns 3. - Print Fix(0) ' returns 0. - Print Fix(-3.14159) ' returns -3. + Print Fix(3.14159) ' returns 3. + Print Fix(0) ' returns 0. + Print Fix(-3.14159) ' returns -3. End Sub diff --git a/source/text/sbasic/shared/03080502.xhp b/source/text/sbasic/shared/03080502.xhp index d3fd643bbe..4e85e222cd 100644 --- a/source/text/sbasic/shared/03080502.xhp +++ b/source/text/sbasic/shared/03080502.xhp @@ -54,9 +54,9 @@ Example: Sub ExampleInt - Print Int(3.99) ' returns the value 3 - Print Int(0) ' returns the value 0 - Print Int(-3.14159) ' returns the value -4 + Print Int(3.99) ' returns the value 3 + Print Int(0) ' returns the value 0 + Print Int(-3.14159) ' returns the value -4 End Sub diff --git a/source/text/sbasic/shared/03080601.xhp b/source/text/sbasic/shared/03080601.xhp index 4df563df40..3a0b4e9936 100644 --- a/source/text/sbasic/shared/03080601.xhp +++ b/source/text/sbasic/shared/03080601.xhp @@ -57,9 +57,9 @@ Sub ExampleDifference Dim siW1 As Single Dim siW2 As Single - siW1 = Int(InputBox("Please enter the first amount","Value Input")) - siW2 = Int(InputBox("Please enter the second amount","Value Input")) - Print "The difference is "; Abs(siW1 - siW2) + siW1 = Int(InputBox("Please enter the first amount","Value Input")) + siW2 = Int(InputBox("Please enter the second amount","Value Input")) + Print "The difference is "; Abs(siW1 - siW2) End Sub diff --git a/source/text/sbasic/shared/03080701.xhp b/source/text/sbasic/shared/03080701.xhp index 8525d3827c..2b9e344517 100644 --- a/source/text/sbasic/shared/03080701.xhp +++ b/source/text/sbasic/shared/03080701.xhp @@ -90,9 +90,9 @@ Example: Sub ExampleSgn - Print sgn(-10) ' returns -1 - Print sgn(0) ' returns 0 - Print sgn(10) ' returns 1 + Print sgn(-10) ' returns -1 + Print sgn(0) ' returns 0 + Print sgn(10) ' returns 1 End Sub diff --git a/source/text/sbasic/shared/03080801.xhp b/source/text/sbasic/shared/03080801.xhp index bc602c791c..5ed4716bb1 100644 --- a/source/text/sbasic/shared/03080801.xhp +++ b/source/text/sbasic/shared/03080801.xhp @@ -56,21 +56,21 @@ Sub ExampleHex ' uses BasicFormulas in $[officename] Calc Dim a2, b2, c2 As String - a2 = "&H3E8" - b2 = Hex2Int(a2) - MsgBox b2 - c2 = Int2Hex(b2) - MsgBox c2 + a2 = "&H3E8" + b2 = Hex2Int(a2) + MsgBox b2 + c2 = Int2Hex(b2) + MsgBox c2 End Sub Function Hex2Int( sHex As String ) As Long ' Returns a long integer from a hexadecimal value. - Hex2Int = clng( sHex ) + Hex2Int = clng( sHex ) End Function Function Int2Hex( iLong As Long) As String ' Calculates a hexadecimal value in integer. - Int2Hex = "&H" & Hex( iLong ) + Int2Hex = "&H" & Hex( iLong ) End Function diff --git a/source/text/sbasic/shared/03080802.xhp b/source/text/sbasic/shared/03080802.xhp index b495ef3054..75801e9911 100644 --- a/source/text/sbasic/shared/03080802.xhp +++ b/source/text/sbasic/shared/03080802.xhp @@ -54,7 +54,7 @@ Example: Sub ExampleOct - MsgBox Oct(255) + MsgBox Oct(255) End Sub diff --git a/source/text/sbasic/shared/03090101.xhp b/source/text/sbasic/shared/03090101.xhp index c7f458d6d9..a7753b2d43 100644 --- a/source/text/sbasic/shared/03090101.xhp +++ b/source/text/sbasic/shared/03090101.xhp @@ -56,17 +56,17 @@ Sub ExampleIfThenDate Dim sDate As String Dim sToday As String - sDate = InputBox("Enter the expiration date (MM.DD.YYYY)") - sDate = Right$(sDate, 4) + Mid$(sDate, 4, 2) + Left$(sDate, 2) - sToday = Date$ - sToday = Right$(sToday, 4)+ Mid$(sToday, 4, 2) + Left$(sToday, 2) - If sDate < sToday Then - MsgBox "The expiration date has passed" - ElseIf sDate > sToday Then - MsgBox "The expiration date has not yet passed" - Else - MsgBox "The expiration date is today" - End If + sDate = InputBox("Enter the expiration date (MM.DD.YYYY)") + sDate = Right$(sDate, 4) + Mid$(sDate, 4, 2) + Left$(sDate, 2) + sToday = Date$ + sToday = Right$(sToday, 4)+ Mid$(sToday, 4, 2) + Left$(sToday, 2) + If sDate < sToday Then + MsgBox "The expiration date has passed" + ElseIf sDate > sToday Then + MsgBox "The expiration date has not yet passed" + Else + MsgBox "The expiration date is today" + End If End Sub diff --git a/source/text/sbasic/shared/03090102.xhp b/source/text/sbasic/shared/03090102.xhp index 8819dcf1bf..5f63bf7974 100644 --- a/source/text/sbasic/shared/03090102.xhp +++ b/source/text/sbasic/shared/03090102.xhp @@ -52,17 +52,17 @@ Sub ExampleRandomSelect Dim iVar As Integer - iVar = Int((15 * Rnd) -2) - Select Case iVar - Case 1 To 5 - Print "Number from 1 to 5" - Case 6, 7, 8 - Print "Number from 6 to 8" - Case 8 To 10 - Print "Greater than 8" - Case Else - Print "Out of range 1 to 10" - End Select + iVar = Int((15 * Rnd) -2) + Select Case iVar + Case 1 To 5 + Print "Number from 1 to 5" + Case 6, 7, 8 + Print "Number from 6 to 8" + Case 8 To 10 + Print "Greater than 8" + Case Else + Print "Out of range 1 to 10" + End Select End Sub diff --git a/source/text/sbasic/shared/03090201.xhp b/source/text/sbasic/shared/03090201.xhp index bb2ef774e0..a7ac8ec2cc 100644 --- a/source/text/sbasic/shared/03090201.xhp +++ b/source/text/sbasic/shared/03090201.xhp @@ -88,14 +88,14 @@ Sub ExampleDoLoop Dim sFile As String Dim sPath As String - sPath = "c:\" - sFile = Dir$( sPath ,22) - If sFile <> "" Then - Do - MsgBox sFile - sFile = Dir$ - Loop Until sFile = "" - End If + sPath = "c:\" + sFile = Dir$( sPath ,22) + If sFile <> "" Then + Do + MsgBox sFile + sFile = Dir$ + Loop Until sFile = "" + End If End Sub diff --git a/source/text/sbasic/shared/03090202.xhp b/source/text/sbasic/shared/03090202.xhp index 4ac247a567..eefb033f33 100644 --- a/source/text/sbasic/shared/03090202.xhp +++ b/source/text/sbasic/shared/03090202.xhp @@ -76,28 +76,28 @@ Dim iCount As Integer Dim iCount2 As Integer Dim sTemp As String - sEntry(0) = "Jerry" - sEntry(1) = "Patty" - sEntry(2) = "Kurt" - sEntry(3) = "Thomas" - sEntry(4) = "Michael" - sEntry(5) = "David" - sEntry(6) = "Cathy" - sEntry(7) = "Susie" - sEntry(8) = "Edward" - sEntry(9) = "Christine" - For iCount = 0 To 9 - For iCount2 = iCount + 1 To 9 - If sEntry(iCount) > sEntry(iCount2) Then - sTemp = sEntry(iCount) - sEntry(iCount) = sEntry(iCount2) - sEntry(iCount2) = sTemp - End If - Next iCount2 - Next iCount - For iCount = 0 To 9 - Print sEntry(iCount) - Next iCount + sEntry(0) = "Jerry" + sEntry(1) = "Patty" + sEntry(2) = "Kurt" + sEntry(3) = "Thomas" + sEntry(4) = "Michael" + sEntry(5) = "David" + sEntry(6) = "Cathy" + sEntry(7) = "Susie" + sEntry(8) = "Edward" + sEntry(9) = "Christine" + For iCount = 0 To 9 + For iCount2 = iCount + 1 To 9 + If sEntry(iCount) > sEntry(iCount2) Then + sTemp = sEntry(iCount) + sEntry(iCount) = sEntry(iCount2) + sEntry(iCount2) = sTemp + End If + Next iCount2 + Next iCount + For iCount = 0 To 9 + Print sEntry(iCount) + Next iCount End Sub diff --git a/source/text/sbasic/shared/03090301.xhp b/source/text/sbasic/shared/03090301.xhp index 11b229731b..21f7cfb8b8 100644 --- a/source/text/sbasic/shared/03090301.xhp +++ b/source/text/sbasic/shared/03090301.xhp @@ -64,18 +64,18 @@ Dim iInputa As Single Dim iInputb As Single Dim iInputc As Single - iInputa = Int(InputBox("Enter the first number: ","NumberInput")) - iInputb = Int(InputBox("Enter the second number: ","NumberInput")) - iInputc=iInputa - GoSub SquareRoot - Print "The square root of";iInputa;" is";iInputc - iInputc=iInputb - GoSub SquareRoot - Print "The square root of";iInputb;" is";iInputc - Exit Sub + iInputa = Int(InputBox("Enter the first number: ","NumberInput")) + iInputb = Int(InputBox("Enter the second number: ","NumberInput")) + iInputc=iInputa + GoSub SquareRoot + Print "The square root of";iInputa;" is";iInputc + iInputc=iInputb + GoSub SquareRoot + Print "The square root of";iInputb;" is";iInputc + Exit Sub SquareRoot: - iInputc=sqr(iInputc) - Return + iInputc=sqr(iInputc) + Return End Sub diff --git a/source/text/sbasic/shared/03090303.xhp b/source/text/sbasic/shared/03090303.xhp index d64d0afdb7..ad0d3317cf 100644 --- a/source/text/sbasic/shared/03090303.xhp +++ b/source/text/sbasic/shared/03090303.xhp @@ -55,21 +55,21 @@ Sub ExampleOnGosub Dim iVar As Integer Dim sVar As String - iVar = 2 - sVar ="" - On iVar GoSub Sub1, Sub2 - On iVar GoTo Line1, Line2 - Exit Sub + iVar = 2 + sVar ="" + On iVar GoSub Sub1, Sub2 + On iVar GoTo Line1, Line2 + Exit Sub Sub1: - sVar =sVar & " From Sub 1 to" : Return + sVar =sVar & " From Sub 1 to" : Return Sub2: - sVar =sVar & " From Sub 2 to" : Return + sVar =sVar & " From Sub 2 to" : Return Line1: - sVar =sVar & " Label 1" : GoTo Ende + sVar =sVar & " Label 1" : GoTo Ende Line2: - sVar =sVar & " Label 2" + sVar =sVar & " Label 2" Ende: - MsgBox sVar,0,"On...GoSub" + MsgBox sVar,0,"On...GoSub" End Sub diff --git a/source/text/sbasic/shared/03090402.xhp b/source/text/sbasic/shared/03090402.xhp index 8cec6a9e38..c44650e022 100644 --- a/source/text/sbasic/shared/03090402.xhp +++ b/source/text/sbasic/shared/03090402.xhp @@ -56,12 +56,12 @@ Sub ExampleChoose Dim sReturn As String - sReturn = ChooseMenu(2) - Print sReturn + sReturn = ChooseMenu(2) + Print sReturn End Sub Function ChooseMenu(Index As Integer) - ChooseMenu = Choose(Index, "Quick Format", "Save Format", "System Format") + ChooseMenu = Choose(Index, "Quick Format", "Save Format", "System Format") End Function diff --git a/source/text/sbasic/shared/03090403.xhp b/source/text/sbasic/shared/03090403.xhp index d7f6ff0db9..2d933860ee 100644 --- a/source/text/sbasic/shared/03090403.xhp +++ b/source/text/sbasic/shared/03090403.xhp @@ -61,9 +61,9 @@ Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( Long ) Sub ExampleDeclare Dim lValue As Long - lValue = 5000 - MyMessageBeep( lValue ) - FreeLibrary("user32.dll" ) + lValue = 5000 + MyMessageBeep( lValue ) + FreeLibrary("user32.dll" ) End Sub diff --git a/source/text/sbasic/shared/03090404.xhp b/source/text/sbasic/shared/03090404.xhp index a85296ab0d..2cb6340e8a 100644 --- a/source/text/sbasic/shared/03090404.xhp +++ b/source/text/sbasic/shared/03090404.xhp @@ -57,17 +57,17 @@ Sub ExampleRandomSelect Dim iVar As Integer - iVar = Int((15 * Rnd) -2) - Select Case iVar - Case 1 To 5 - Print "Number from 1 to 5" - Case 6, 7, 8 - Print "Number from 6 to 8" - Case Is > 8 And iVar < 11 - Print "Greater than 8" - Case Else - Print "Outside range 1 to 10" - End Select + iVar = Int((15 * Rnd) -2) + Select Case iVar + Case 1 To 5 + Print "Number from 1 to 5" + Case 6, 7, 8 + Print "Number from 6 to 8" + Case Is > 8 And iVar < 11 + Print "Greater than 8" + Case Else + Print "Outside range 1 to 10" + End Select End Sub diff --git a/source/text/sbasic/shared/03090405.xhp b/source/text/sbasic/shared/03090405.xhp index 954d084e31..414d757b5a 100644 --- a/source/text/sbasic/shared/03090405.xhp +++ b/source/text/sbasic/shared/03090405.xhp @@ -54,9 +54,9 @@ Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( Long ) Sub ExampleDeclare Dim lValue As Long - lValue = 5000 - MyMessageBeep( lValue ) - FreeLibrary("user32.dll" ) + lValue = 5000 + MyMessageBeep( lValue ) + FreeLibrary("user32.dll" ) End Sub diff --git a/source/text/sbasic/shared/03090406.xhp b/source/text/sbasic/shared/03090406.xhp index 019383516f..cca5fc2b2c 100644 --- a/source/text/sbasic/shared/03090406.xhp +++ b/source/text/sbasic/shared/03090406.xhp @@ -59,25 +59,25 @@ Dim sReturn As String Dim sListArray(10) As String Dim siStep As Single - For siStep = 0 To 10 ' Fill array with test data - sListArray(siStep) = chr$(siStep + 65) - MsgBox sListArray(siStep) - Next siStep - sReturn = LinSearch(sListArray(), "B") - Print sReturn + For siStep = 0 To 10 ' Fill array with test data + sListArray(siStep) = chr$(siStep + 65) + MsgBox sListArray(siStep) + Next siStep + sReturn = LinSearch(sListArray(), "B") + Print sReturn End Sub Function LinSearch( sList(), sItem As String ) As Integer Dim iCount As Integer ' Linsearch searches a TextArray:sList() for a TextEntry: ' Return value Is the index of the entry Or 0 (Null) - For iCount=1 To Ubound( sList() ) - If sList( iCount ) = sItem Then - Exit For ' sItem found - End If - Next iCount - If iCount = Ubound( sList() ) Then iCount = 0 - LinSearch = iCount + For iCount=1 To Ubound( sList() ) + If sList( iCount ) = sItem Then + Exit For ' sItem found + End If + Next iCount + If iCount = Ubound( sList() ) Then iCount = 0 + LinSearch = iCount End Function diff --git a/source/text/sbasic/shared/03090407.xhp b/source/text/sbasic/shared/03090407.xhp index c3bd9e84fe..3926a29218 100644 --- a/source/text/sbasic/shared/03090407.xhp +++ b/source/text/sbasic/shared/03090407.xhp @@ -53,9 +53,9 @@ Sub ExampleMid Dim sVar As String - sVar = "Las Vegas" - Print Mid(sVar,3,5) ' Returns "s Veg" - ' Nothing occurs here + sVar = "Las Vegas" + Print Mid(sVar,3,5) ' Returns "s Veg" + ' Nothing occurs here End Sub diff --git a/source/text/sbasic/shared/03090408.xhp b/source/text/sbasic/shared/03090408.xhp index 1cb284a6a7..f2b21339c4 100644 --- a/source/text/sbasic/shared/03090408.xhp +++ b/source/text/sbasic/shared/03090408.xhp @@ -47,9 +47,9 @@ Sub ExampleStop Dim iVar As Single - iVar = 36 - Stop - MsgBox Sqr(iVar) + iVar = 36 + Stop + MsgBox Sqr(iVar) End Sub diff --git a/source/text/sbasic/shared/03090409.xhp b/source/text/sbasic/shared/03090409.xhp index a1aac7bfc5..5fc1f45345 100644 --- a/source/text/sbasic/shared/03090409.xhp +++ b/source/text/sbasic/shared/03090409.xhp @@ -53,7 +53,7 @@ Example: Sub Example - ' some statements + ' some statements End Sub diff --git a/source/text/sbasic/shared/03090410.xhp b/source/text/sbasic/shared/03090410.xhp index fa48227a15..81e619f7a6 100644 --- a/source/text/sbasic/shared/03090410.xhp +++ b/source/text/sbasic/shared/03090410.xhp @@ -55,12 +55,12 @@ Sub ExampleSwitch Dim sGender As String - sGender = GetGenderIndex( "John" ) - MsgBox sGender + sGender = GetGenderIndex( "John" ) + MsgBox sGender End Sub Function GetGenderIndex (sName As String) As String - GetGenderIndex = Switch(sName = "Jane", "female", sName = "John", "male") + GetGenderIndex = Switch(sName = "Jane", "female", sName = "John", "male") End Function diff --git a/source/text/sbasic/shared/03090412.xhp b/source/text/sbasic/shared/03090412.xhp index 087f5c54b7..1c2649f59d 100644 --- a/source/text/sbasic/shared/03090412.xhp +++ b/source/text/sbasic/shared/03090412.xhp @@ -60,25 +60,25 @@ Dim sReturn As String Dim sListArray(10) As String Dim siStep As Single - For siStep = 0 To 10 ' Fill array with test data - sListArray(siStep) = chr(siStep + 65) - MsgBox sListArray(siStep) - Next siStep - sReturn = LinSearch(sListArray(), "B") - Print sReturn + For siStep = 0 To 10 ' Fill array with test data + sListArray(siStep) = chr(siStep + 65) + MsgBox sListArray(siStep) + Next siStep + sReturn = LinSearch(sListArray(), "B") + Print sReturn End Sub Function LinSearch( sList(), sItem As String ) As Integer Dim iCount As Integer ' LinSearch searches a TextArray:sList() for a TextEntry: ' Returns the index of the entry or 0 (Null) - For iCount=1 To Ubound( sList() ) - If sList( iCount ) = sItem Then - Exit For ' sItem found - End If - Next iCount - If iCount = Ubound( sList() ) Then iCount = 0 - LinSearch = iCount + For iCount=1 To Ubound( sList() ) + If sList( iCount ) = sItem Then + Exit For ' sItem found + End If + Next iCount + If iCount = Ubound( sList() ) Then iCount = 0 + LinSearch = iCount End Function diff --git a/source/text/sbasic/shared/03100100.xhp b/source/text/sbasic/shared/03100100.xhp index d8fb8357ea..79142c7123 100644 --- a/source/text/sbasic/shared/03100100.xhp +++ b/source/text/sbasic/shared/03100100.xhp @@ -57,14 +57,14 @@ Sub ExampleCBool Dim sText As String - sText = InputBox("Please enter a short sentence:") - ' Proof if the word »and« appears in the sentence. - ' Instead of the command line - ' If Instr(Input, "and")<>0 Then... - ' the CBool function is applied as follows: - If CBool(Instr(sText, "and")) Then - MsgBox "The word »and« appears in the sentence you entered!" - EndIf + sText = InputBox("Please enter a short sentence:") + ' Proof if the word »and« appears in the sentence. + ' Instead of the command line + ' If Instr(Input, "and")<>0 Then... + ' the CBool function is applied as follows: + If CBool(Instr(sText, "and")) Then + MsgBox "The word »and« appears in the sentence you entered!" + EndIf End Sub diff --git a/source/text/sbasic/shared/03100300.xhp b/source/text/sbasic/shared/03100300.xhp index 67e80eb4a6..9a68f74324 100644 --- a/source/text/sbasic/shared/03100300.xhp +++ b/source/text/sbasic/shared/03100300.xhp @@ -55,8 +55,8 @@ Example: Sub ExampleCDate - MsgBox cDate(1000.25) ' 09.26.1902 06:00:00 - MsgBox cDate(1001.26) ' 09.27.1902 06:14:24 + MsgBox cDate(1000.25) ' 09.26.1902 06:00:00 + MsgBox cDate(1001.26) ' 09.27.1902 06:14:24 End Sub diff --git a/source/text/sbasic/shared/03100400.xhp b/source/text/sbasic/shared/03100400.xhp index 970cb5648f..ed29d8b488 100644 --- a/source/text/sbasic/shared/03100400.xhp +++ b/source/text/sbasic/shared/03100400.xhp @@ -52,9 +52,9 @@ Example: Sub ExampleCountryConvert - MsgBox CDbl(1234.5678) - MsgBox CInt(1234.5678) - MsgBox CLng(1234.5678) + MsgBox CDbl(1234.5678) + MsgBox CInt(1234.5678) + MsgBox CLng(1234.5678) End Sub diff --git a/source/text/sbasic/shared/03100500.xhp b/source/text/sbasic/shared/03100500.xhp index 32e3c57661..d1018e40df 100644 --- a/source/text/sbasic/shared/03100500.xhp +++ b/source/text/sbasic/shared/03100500.xhp @@ -55,9 +55,9 @@ Example: Sub ExampleCountryConvert - MsgBox CDbl(1234.5678) - MsgBox CInt(1234.5678) - MsgBox CLng(1234.5678) + MsgBox CDbl(1234.5678) + MsgBox CInt(1234.5678) + MsgBox CLng(1234.5678) End Sub diff --git a/source/text/sbasic/shared/03100600.xhp b/source/text/sbasic/shared/03100600.xhp index a391d1d432..704d5a0738 100644 --- a/source/text/sbasic/shared/03100600.xhp +++ b/source/text/sbasic/shared/03100600.xhp @@ -55,9 +55,9 @@ Example: Sub ExampleCountryConvert - MsgBox CDbl(1234.5678) - MsgBox CInt(1234.5678) - MsgBox CLng(1234.5678) + MsgBox CDbl(1234.5678) + MsgBox CInt(1234.5678) + MsgBox CLng(1234.5678) End Sub diff --git a/source/text/sbasic/shared/03100700.xhp b/source/text/sbasic/shared/03100700.xhp index ba3bc9d51e..b79232c4de 100644 --- a/source/text/sbasic/shared/03100700.xhp +++ b/source/text/sbasic/shared/03100700.xhp @@ -52,10 +52,10 @@ Example: Sub ExampleConst - Const iVar = 1964 - MsgBox iVar - Const sVar = "Program", dVar As Double = 1.00 - MsgBox sVar & " " & dVar + Const iVar = 1964 + MsgBox iVar + Const sVar = "Program", dVar As Double = 1.00 + MsgBox sVar & " " & dVar End Sub diff --git a/source/text/sbasic/shared/03100900.xhp b/source/text/sbasic/shared/03100900.xhp index 79fecee834..f51e1971d2 100644 --- a/source/text/sbasic/shared/03100900.xhp +++ b/source/text/sbasic/shared/03100900.xhp @@ -54,10 +54,10 @@ Example: Sub ExampleCSNG - MsgBox CDbl(1234.5678) - MsgBox CInt(1234.5678) - MsgBox CLng(1234.5678) - MsgBox CSng(1234.5678) + MsgBox CDbl(1234.5678) + MsgBox CInt(1234.5678) + MsgBox CLng(1234.5678) + MsgBox CSng(1234.5678) End Sub diff --git a/source/text/sbasic/shared/03101000.xhp b/source/text/sbasic/shared/03101000.xhp index 248f4b2e54..f98aca3cdd 100644 --- a/source/text/sbasic/shared/03101000.xhp +++ b/source/text/sbasic/shared/03101000.xhp @@ -102,12 +102,12 @@ Sub ExampleCSTR Dim sVar As String - MsgBox CDbl(1234.5678) - MsgBox CInt(1234.5678) - MsgBox CLng(1234.5678) - MsgBox CSng(1234.5678) - sVar = CStr(1234.5678) - MsgBox sVar + MsgBox CDbl(1234.5678) + MsgBox CInt(1234.5678) + MsgBox CLng(1234.5678) + MsgBox CSng(1234.5678) + sVar = CStr(1234.5678) + MsgBox sVar End Sub diff --git a/source/text/sbasic/shared/03101100.xhp b/source/text/sbasic/shared/03101100.xhp index 237378858a..4559a5ed82 100644 --- a/source/text/sbasic/shared/03101100.xhp +++ b/source/text/sbasic/shared/03101100.xhp @@ -60,7 +60,7 @@ DefObj o DefVar v Sub ExampleDefBool - bOK=TRUE ' bOK is an implicit boolean variable + bOK=TRUE ' bOK is an implicit boolean variable End Sub diff --git a/source/text/sbasic/shared/03101120.xhp b/source/text/sbasic/shared/03101120.xhp index e8e7b648cb..fcaf086f82 100644 --- a/source/text/sbasic/shared/03101120.xhp +++ b/source/text/sbasic/shared/03101120.xhp @@ -61,7 +61,7 @@ DefVar v DefErr e Sub ExampleDefErr - eErr=Error ' eErr is an implicit error variable + eErr=Error ' eErr is an implicit error variable End Sub diff --git a/source/text/sbasic/shared/03101130.xhp b/source/text/sbasic/shared/03101130.xhp index 0ddb8a93b1..15f52373a6 100644 --- a/source/text/sbasic/shared/03101130.xhp +++ b/source/text/sbasic/shared/03101130.xhp @@ -61,7 +61,7 @@ DefVar v DefSng s Sub ExampleDefSng - sSng=Single ' sSng is an implicit single variable + sSng=Single ' sSng is an implicit single variable End Sub diff --git a/source/text/sbasic/shared/03101140.xhp b/source/text/sbasic/shared/03101140.xhp index 86b0ef5d16..df1548d683 100644 --- a/source/text/sbasic/shared/03101140.xhp +++ b/source/text/sbasic/shared/03101140.xhp @@ -61,7 +61,7 @@ DefVar v DefStr s Sub ExampleDefStr - sStr=String ' sStr is an implicit string variable + sStr=String ' sStr is an implicit string variable End Sub diff --git a/source/text/sbasic/shared/03101300.xhp b/source/text/sbasic/shared/03101300.xhp index 5f0f2ca25d..72eb853a04 100644 --- a/source/text/sbasic/shared/03101300.xhp +++ b/source/text/sbasic/shared/03101300.xhp @@ -60,7 +60,7 @@ DefObj o DefVar v Sub ExampleDefDate - tDate=Date ' tDate is an implicit date variable + tDate=Date ' tDate is an implicit date variable End Sub diff --git a/source/text/sbasic/shared/03101400.xhp b/source/text/sbasic/shared/03101400.xhp index 6537219472..8976d13479 100644 --- a/source/text/sbasic/shared/03101400.xhp +++ b/source/text/sbasic/shared/03101400.xhp @@ -60,7 +60,7 @@ DefObj o DefVar v Sub ExampleDefDBL - dValue=1.23e43 ' dValue is an implicit double variable type + dValue=1.23e43 ' dValue is an implicit double variable type End Sub diff --git a/source/text/sbasic/shared/03101500.xhp b/source/text/sbasic/shared/03101500.xhp index 1b15623a5d..557f1235a0 100644 --- a/source/text/sbasic/shared/03101500.xhp +++ b/source/text/sbasic/shared/03101500.xhp @@ -60,7 +60,7 @@ DefObj o DefVar v Sub ExampleDefInt - iCount=200 ' iCount is an implicit integer variable + iCount=200 ' iCount is an implicit integer variable End Sub diff --git a/source/text/sbasic/shared/03101600.xhp b/source/text/sbasic/shared/03101600.xhp index 8d9fde95f7..4e3dec3f58 100644 --- a/source/text/sbasic/shared/03101600.xhp +++ b/source/text/sbasic/shared/03101600.xhp @@ -60,7 +60,7 @@ DefObj o DefVar v Sub ExampleDefLng - lCount=123456789 ' lCount is an implicit long integer variable + lCount=123456789 ' lCount is an implicit long integer variable End Sub diff --git a/source/text/sbasic/shared/03102000.xhp b/source/text/sbasic/shared/03102000.xhp index 3f5f21c44e..94b506bdb9 100644 --- a/source/text/sbasic/shared/03102000.xhp +++ b/source/text/sbasic/shared/03102000.xhp @@ -60,8 +60,8 @@ DefObj o DefVar v Sub ExampleDefVar - vDiv=99 ' vDiv is an implicit variant - vDiv="Hello world" + vDiv=99 ' vDiv is an implicit variant + vDiv="Hello world" End Sub diff --git a/source/text/sbasic/shared/03102100.xhp b/source/text/sbasic/shared/03102100.xhp index 3b8531ca28..f8f7f0c7fc 100644 --- a/source/text/sbasic/shared/03102100.xhp +++ b/source/text/sbasic/shared/03102100.xhp @@ -84,7 +84,7 @@ Sub ExampleDim1 Dim sVar As String Dim iVar As Integer - sVar = "Office" + sVar = "Office" End Sub Sub ExampleDim2 @@ -92,14 +92,14 @@ Dim stext(20,2) As String Const sDim As String = " Dimension:" For i = 0 To 20 - For ii = 0 To 2 - stext(i,ii) = str(i) & sDim & str(ii) - Next ii + For ii = 0 To 2 + stext(i,ii) = str(i) & sDim & str(ii) + Next ii Next i For i = 0 To 20 - For ii = 0 To 2 - MsgBox stext(i,ii) - Next ii + For ii = 0 To 2 + MsgBox stext(i,ii) + Next ii Next i End Sub diff --git a/source/text/sbasic/shared/03102101.xhp b/source/text/sbasic/shared/03102101.xhp index 6804d8d068..342f88315c 100644 --- a/source/text/sbasic/shared/03102101.xhp +++ b/source/text/sbasic/shared/03102101.xhp @@ -74,11 +74,11 @@ Dim iVar() As Integer, iCount As Integer ReDim iVar(5) As Integer For iCount = 1 To 5 - iVar(iCount) = iCount + iVar(iCount) = iCount Next iCount ReDim iVar(10) As Integer For iCount = 1 To 10 - iVar(iCount) = iCount + iVar(iCount) = iCount Next iCount End Sub diff --git a/source/text/sbasic/shared/03102200.xhp b/source/text/sbasic/shared/03102200.xhp index dc8d71e1c7..b7885f1f67 100644 --- a/source/text/sbasic/shared/03102200.xhp +++ b/source/text/sbasic/shared/03102200.xhp @@ -55,7 +55,7 @@ Sub ExampleIsArray Dim sDatf(10) As String - Print isarray(sdatf()) + Print isarray(sdatf()) End Sub diff --git a/source/text/sbasic/shared/03102300.xhp b/source/text/sbasic/shared/03102300.xhp index 31ea25fbf2..cc5f5c57c4 100644 --- a/source/text/sbasic/shared/03102300.xhp +++ b/source/text/sbasic/shared/03102300.xhp @@ -55,10 +55,10 @@ Sub ExampleIsDate Dim sDateVar As String - sDateVar = "12.12.1997" - Print IsDate(sDateVar) ' Returns True - sDateVar = "12121997" - Print IsDate(sDateVar) ' Returns False + sDateVar = "12.12.1997" + Print IsDate(sDateVar) ' Returns True + sDateVar = "12121997" + Print IsDate(sDateVar) ' Returns False End Sub diff --git a/source/text/sbasic/shared/03102400.xhp b/source/text/sbasic/shared/03102400.xhp index 80e57244e5..e9af071b1f 100644 --- a/source/text/sbasic/shared/03102400.xhp +++ b/source/text/sbasic/shared/03102400.xhp @@ -55,8 +55,8 @@ Sub ExampleIsEmpty Dim sVar As Variant - sVar = Empty - Print IsEmpty(sVar) ' Returns True + sVar = Empty + Print IsEmpty(sVar) ' Returns True End Sub diff --git a/source/text/sbasic/shared/03102600.xhp b/source/text/sbasic/shared/03102600.xhp index 9476e4e3b9..969a6943ac 100644 --- a/source/text/sbasic/shared/03102600.xhp +++ b/source/text/sbasic/shared/03102600.xhp @@ -57,7 +57,7 @@ Sub ExampleIsNull Dim vVar As Variant - MsgBox IsNull(vVar) + MsgBox IsNull(vVar) End Sub diff --git a/source/text/sbasic/shared/03102700.xhp b/source/text/sbasic/shared/03102700.xhp index 0f2728c5b5..64f380c398 100644 --- a/source/text/sbasic/shared/03102700.xhp +++ b/source/text/sbasic/shared/03102700.xhp @@ -55,10 +55,10 @@ Sub ExampleIsNumeric Dim vVar As Variant - vVar = "ABC" - Print IsNumeric(vVar) ' Returns False - vVar = "123" - Print IsNumeric(vVar) ' Returns True + vVar = "ABC" + Print IsNumeric(vVar) ' Returns False + vVar = "123" + Print IsNumeric(vVar) ' Returns True End Sub diff --git a/source/text/sbasic/shared/03102900.xhp b/source/text/sbasic/shared/03102900.xhp index 67700502ad..ad39eb8d75 100644 --- a/source/text/sbasic/shared/03102900.xhp +++ b/source/text/sbasic/shared/03102900.xhp @@ -57,16 +57,16 @@ Sub ExampleUboundLbound Dim sVar(10 To 20) As String - Print LBound(sVar()) - Print UBound(sVar()) + Print LBound(sVar()) + Print UBound(sVar()) End Sub Sub ExampleUboundLbound2 Dim sVar(10 To 20,5 To 70) As String - Print LBound(sVar()) ' Returns 10 - Print UBound(sVar()) ' Returns 20 - Print LBound(sVar(),2) ' Returns 5 - Print UBound(sVar(),2) ' Returns 70 + Print LBound(sVar()) ' Returns 10 + Print UBound(sVar()) ' Returns 20 + Print LBound(sVar(),2) ' Returns 5 + Print UBound(sVar(),2) ' Returns 70 End Sub diff --git a/source/text/sbasic/shared/03103000.xhp b/source/text/sbasic/shared/03103000.xhp index b70f2ddd7e..c70d67daa1 100644 --- a/source/text/sbasic/shared/03103000.xhp +++ b/source/text/sbasic/shared/03103000.xhp @@ -57,16 +57,16 @@ Sub ExampleUboundLbound Dim sVar(10 To 20) As String - Print LBound(sVar()) - Print UBound(sVar()) + Print LBound(sVar()) + Print UBound(sVar()) End Sub Sub ExampleUboundLbound2 Dim sVar(10 To 20,5 To 70) As String - Print LBound(sVar()) ' Returns 10 - Print UBound(sVar()) ' Returns 20 - Print LBound(sVar(),2) ' Returns 5 - Print UBound(sVar(),2) ' Returns 70 + Print LBound(sVar()) ' Returns 10 + Print UBound(sVar()) ' Returns 20 + Print LBound(sVar(),2) ' Returns 5 + Print UBound(sVar(),2) ' Returns 70 End Sub diff --git a/source/text/sbasic/shared/03103100.xhp b/source/text/sbasic/shared/03103100.xhp index 8847ae7551..43cb797a95 100644 --- a/source/text/sbasic/shared/03103100.xhp +++ b/source/text/sbasic/shared/03103100.xhp @@ -51,8 +51,8 @@ Sub ExampleLet Dim sText As String - Let sText = "Las Vegas" - MsgBox Len(sText) ' returns 9 + Let sText = "Las Vegas" + MsgBox Len(sText) ' returns 9 End Sub diff --git a/source/text/sbasic/shared/03103200.xhp b/source/text/sbasic/shared/03103200.xhp index 4e9a5ad1a6..19fa32eedd 100644 --- a/source/text/sbasic/shared/03103200.xhp +++ b/source/text/sbasic/shared/03103200.xhp @@ -50,8 +50,8 @@ Option Base 1 Sub ExampleOptionBase - Dim sVar(20) As String - MsgBox LBound(sVar()) + Dim sVar(20) As String + MsgBox LBound(sVar()) End Sub diff --git a/source/text/sbasic/shared/03103300.xhp b/source/text/sbasic/shared/03103300.xhp index 511fea7967..5140351ef5 100644 --- a/source/text/sbasic/shared/03103300.xhp +++ b/source/text/sbasic/shared/03103300.xhp @@ -51,10 +51,10 @@ Option Explicit Sub ExampleExplicit Dim sVar As String - sVar = "Las Vegas" - For i% = 1 To 10 ' This results in a run-time error - Rem - Next i% + sVar = "Las Vegas" + For i% = 1 To 10 ' This results in a run-time error + Rem + Next i% End Sub diff --git a/source/text/sbasic/shared/03103400.xhp b/source/text/sbasic/shared/03103400.xhp index eb0ae0a4f3..d94a50f633 100644 --- a/source/text/sbasic/shared/03103400.xhp +++ b/source/text/sbasic/shared/03103400.xhp @@ -47,8 +47,8 @@ Public iPublicVar As Integer Sub ExamplePublic - iPublicVar = iPublicVar + 1 - MsgBox iPublicVar + iPublicVar = iPublicVar + 1 + MsgBox iPublicVar End Sub diff --git a/source/text/sbasic/shared/03103450.xhp b/source/text/sbasic/shared/03103450.xhp index 52ae1eed64..c83b600fb9 100644 --- a/source/text/sbasic/shared/03103450.xhp +++ b/source/text/sbasic/shared/03103450.xhp @@ -47,8 +47,8 @@ Global iGlobalVar As Integer Sub ExampleGlobal - iGlobalVar = iGlobalVar + 1 - MsgBox iGlobalVar + iGlobalVar = iGlobalVar + 1 + MsgBox iGlobalVar End Sub diff --git a/source/text/sbasic/shared/03103500.xhp b/source/text/sbasic/shared/03103500.xhp index ee98aca543..6dce349991 100644 --- a/source/text/sbasic/shared/03103500.xhp +++ b/source/text/sbasic/shared/03103500.xhp @@ -48,22 +48,22 @@ Sub ExampleStatic Dim iCount As Integer, iResult As Integer - For iCount = 0 To 2 - iResult = InitVar() - Next iCount - MsgBox iResult,0,"The answer is" + For iCount = 0 To 2 + iResult = InitVar() + Next iCount + MsgBox iResult,0,"The answer is" End Sub ' Function for initialization of the static variable Function InitVar() As Integer - Static iInit As Integer - Const iMinimum As Integer = 40 ' minimum return value of this function - If iInit = 0 Then ' check if initialized - iInit = iMinimum - Else - iInit = iInit + 1 - End If - InitVar = iInit + Static iInit As Integer + Const iMinimum As Integer = 40 ' minimum return value of this function + If iInit = 0 Then ' check if initialized + iInit = iMinimum + Else + iInit = iInit + 1 + End If + InitVar = iInit End Function diff --git a/source/text/sbasic/shared/03103600.xhp b/source/text/sbasic/shared/03103600.xhp index d302125719..33a0d2c5a4 100644 --- a/source/text/sbasic/shared/03103600.xhp +++ b/source/text/sbasic/shared/03103600.xhp @@ -197,12 +197,12 @@ Dim dVar As Double Dim bVar As Boolean Dim lVar As Long - MsgBox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_ - TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_ - TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_ - TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_ - TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_ - TypeName(lVar) & " " & VarType(lVar),0,"Some types In $[officename] Basic" + MsgBox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_ + TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_ + TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_ + TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_ + TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_ + TypeName(lVar) & " " & VarType(lVar),0,"Some types In $[officename] Basic" End Sub diff --git a/source/text/sbasic/shared/03103700.xhp b/source/text/sbasic/shared/03103700.xhp index c571b25765..367c58249b 100644 --- a/source/text/sbasic/shared/03103700.xhp +++ b/source/text/sbasic/shared/03103700.xhp @@ -53,8 +53,8 @@ Sub ExampleSet Dim oDoc As Object - Set oDoc = ActiveWindow - Print oDoc.Name + Set oDoc = ActiveWindow + Print oDoc.Name End Sub diff --git a/source/text/sbasic/shared/03110100.xhp b/source/text/sbasic/shared/03110100.xhp index c41b3409e2..98e356fdec 100644 --- a/source/text/sbasic/shared/03110100.xhp +++ b/source/text/sbasic/shared/03110100.xhp @@ -61,14 +61,14 @@ Sub ExampleUnequal Dim sFile As String Dim sRoot As String ' Root directory for file in and output - sRoot = "c:\" - sFile = Dir$( sRoot ,22) - If sFile <> "" Then - Do - MsgBox sFile - sFile = Dir$ - Loop Until sFile = "" - End If + sRoot = "c:\" + sFile = Dir$( sRoot ,22) + If sFile <> "" Then + Do + MsgBox sFile + sFile = Dir$ + Loop Until sFile = "" + End If End Sub diff --git a/source/text/sbasic/shared/03120101.xhp b/source/text/sbasic/shared/03120101.xhp index 628358f2e6..46bd3d4fd8 100644 --- a/source/text/sbasic/shared/03120101.xhp +++ b/source/text/sbasic/shared/03120101.xhp @@ -55,9 +55,9 @@ Example: Sub ExampleASC - Print ASC("A") ' returns 65 - Print ASC("Z") ' returns 90 - Print ASC("Las Vegas") ' returns 76, since only the first character is taken into account + Print ASC("A") ' returns 65 + Print ASC("Z") ' returns 90 + Print ASC("Las Vegas") ' returns 76, since only the first character is taken into account End Sub diff --git a/source/text/sbasic/shared/03120102.xhp b/source/text/sbasic/shared/03120102.xhp index 38393eb352..43b56684fd 100644 --- a/source/text/sbasic/shared/03120102.xhp +++ b/source/text/sbasic/shared/03120102.xhp @@ -55,9 +55,9 @@ Example: Sub ExampleChr - ' This example inserts quotation marks (ASCII value 34) in a string. - MsgBox "A "+ Chr$(34)+"short" + Chr$(34)+" trip." - ' The printout appears in the dialog as: A "short" trip. + ' This example inserts quotation marks (ASCII value 34) in a string. + MsgBox "A "+ Chr$(34)+"short" + Chr$(34)+" trip." + ' The printout appears in the dialog as: A "short" trip. End Sub diff --git a/source/text/sbasic/shared/03120103.xhp b/source/text/sbasic/shared/03120103.xhp index 04723a57de..abd969ad0c 100644 --- a/source/text/sbasic/shared/03120103.xhp +++ b/source/text/sbasic/shared/03120103.xhp @@ -57,9 +57,9 @@ Sub ExampleStr Dim iVar As Single Dim sVar As String - iVar = 123.123 - sVar = LTrim(Str(iVar)) - MsgBox sVar & chr(13) & Str(iVar) + iVar = 123.123 + sVar = LTrim(Str(iVar)) + MsgBox sVar & chr(13) & Str(iVar) End Sub diff --git a/source/text/sbasic/shared/03120104.xhp b/source/text/sbasic/shared/03120104.xhp index 72c362fea4..5a844e8791 100644 --- a/source/text/sbasic/shared/03120104.xhp +++ b/source/text/sbasic/shared/03120104.xhp @@ -55,8 +55,8 @@ Example: Sub ExampleVal - MsgBox Val("123.123") - MsgBox Val("A123.123") + MsgBox Val("123.123") + MsgBox Val("A123.123") End Sub diff --git a/source/text/sbasic/shared/03120201.xhp b/source/text/sbasic/shared/03120201.xhp index 384462fad6..54fce03610 100644 --- a/source/text/sbasic/shared/03120201.xhp +++ b/source/text/sbasic/shared/03120201.xhp @@ -56,12 +56,12 @@ Sub ExampleSpace Dim sText As String,sOut As String Dim iLen As Integer - iLen = 10 - sText = "Las Vegas" - sOut = sText & Space(iLen) & sText & Chr(13) &_ - sText & Space(iLen*2) & sText & Chr(13) &_ - sText & Space(iLen*4) & sText & Chr(13) - MsgBox sOut,0,"Info:" + iLen = 10 + sText = "Las Vegas" + sOut = sText & Space(iLen) & sText & Chr(13) &_ + sText & Space(iLen*2) & sText & Chr(13) &_ + sText & Space(iLen*4) & sText & Chr(13) + MsgBox sOut,0,"Info:" End Sub diff --git a/source/text/sbasic/shared/03120202.xhp b/source/text/sbasic/shared/03120202.xhp index 314956a41c..f3097ae9a5 100644 --- a/source/text/sbasic/shared/03120202.xhp +++ b/source/text/sbasic/shared/03120202.xhp @@ -57,10 +57,10 @@ Sub ExampleString Dim sText As String - sText = String(10,"A") - MsgBox sText - sText = String(10,65) - MsgBox sText + sText = String(10,"A") + MsgBox sText + sText = String(10,65) + MsgBox sText End Sub diff --git a/source/text/sbasic/shared/03120301.xhp b/source/text/sbasic/shared/03120301.xhp index 54f40e0058..7c3b038a95 100644 --- a/source/text/sbasic/shared/03120301.xhp +++ b/source/text/sbasic/shared/03120301.xhp @@ -87,9 +87,9 @@ Example: Sub ExampleFormat - MsgBox Format(6328.2, "##,##0.00") - ' always use a period as decimal delimiter when you enter numbers in Basic source code. - ' displays for example 6,328.20 in English locale, 6.328,20 in German locale. + MsgBox Format(6328.2, "##,##0.00") + ' always use a period as decimal delimiter when you enter numbers in Basic source code. + ' displays for example 6,328.20 in English locale, 6.328,20 in German locale. End Sub diff --git a/source/text/sbasic/shared/03120302.xhp b/source/text/sbasic/shared/03120302.xhp index 6e9a4e8cd4..c5ebdea868 100644 --- a/source/text/sbasic/shared/03120302.xhp +++ b/source/text/sbasic/shared/03120302.xhp @@ -56,9 +56,9 @@ Sub ExampleLUCase Dim sVar As String - sVar = "Las Vegas" - Print LCase(sVar) ' Returns "las vegas" - Print UCase(sVar) ' Returns "LAS VEGAS" + sVar = "Las Vegas" + Print LCase(sVar) ' Returns "las vegas" + Print UCase(sVar) ' Returns "LAS VEGAS" End Sub diff --git a/source/text/sbasic/shared/03120303.xhp b/source/text/sbasic/shared/03120303.xhp index 919aa6b28f..959a4046c8 100644 --- a/source/text/sbasic/shared/03120303.xhp +++ b/source/text/sbasic/shared/03120303.xhp @@ -58,13 +58,13 @@ Sub ExampleUSDate Dim sInput As String Dim sUS_date As String - sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'") - sUS_date = Mid(sInput, 6, 2) - sUS_date = sUS_date & "/" - sUS_date = sUS_date & Right(sInput, 2) - sUS_date = sUS_date & "/" - sUS_date = sUS_date & Left(sInput, 4) - MsgBox sUS_date + sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'") + sUS_date = Mid(sInput, 6, 2) + sUS_date = sUS_date & "/" + sUS_date = sUS_date & Right(sInput, 2) + sUS_date = sUS_date & "/" + sUS_date = sUS_date & Left(sInput, 4) + MsgBox sUS_date End Sub diff --git a/source/text/sbasic/shared/03120304.xhp b/source/text/sbasic/shared/03120304.xhp index 5de4143c63..100338c3fd 100644 --- a/source/text/sbasic/shared/03120304.xhp +++ b/source/text/sbasic/shared/03120304.xhp @@ -55,25 +55,25 @@ Sub ExampleRLSet Dim sVar As String Dim sExpr As String - sVar = String(40,"*") - sExpr = "SBX" - ' Align "SBX" within the 40-character reference string - ' Replace asterisks with spaces - RSet sVar = sExpr - Print ">"; sVar; "<" - sVar = String(5,"*") - sExpr = "123457896" - RSet sVar = sExpr - Print ">"; sVar; "<" - sVar = String(40,"*") - sExpr = "SBX" - ' Left-align "SBX" within the 40-character reference string - LSet sVar = sExpr - Print ">"; sVar; "<" - sVar = String(5,"*") - sExpr = "123456789" - LSet sVar = sExpr - Print ">"; sVar; "<" + sVar = String(40,"*") + sExpr = "SBX" + ' Align "SBX" within the 40-character reference string + ' Replace asterisks with spaces + RSet sVar = sExpr + Print ">"; sVar; "<" + sVar = String(5,"*") + sExpr = "123457896" + RSet sVar = sExpr + Print ">"; sVar; "<" + sVar = String(40,"*") + sExpr = "SBX" + ' Left-align "SBX" within the 40-character reference string + LSet sVar = sExpr + Print ">"; sVar; "<" + sVar = String(5,"*") + sExpr = "123456789" + LSet sVar = sExpr + Print ">"; sVar; "<" End Sub diff --git a/source/text/sbasic/shared/03120305.xhp b/source/text/sbasic/shared/03120305.xhp index 82eb95dac7..d4c91e5eb5 100644 --- a/source/text/sbasic/shared/03120305.xhp +++ b/source/text/sbasic/shared/03120305.xhp @@ -56,15 +56,15 @@ Sub ExampleSpaces Dim sText2 As String,sText As String,sOut As String - sText2 = " <*Las Vegas*> " - sOut = "'"+sText2 +"'"+ Chr(13) - sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " - sOut = sOut + "'"+sText +"'" + Chr(13) - sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" - sOut = sOut +"'"+ sText +"'" + Chr(13) - sText = Trim(sText2) ' sText = "<*Las Vegas*>" - sOut = sOut +"'"+ sText +"'" - MsgBox sOut + sText2 = " <*Las Vegas*> " + sOut = "'"+sText2 +"'"+ Chr(13) + sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " + sOut = sOut + "'"+sText +"'" + Chr(13) + sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + Chr(13) + sText = Trim(sText2) ' sText = "<*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + MsgBox sOut End Sub diff --git a/source/text/sbasic/shared/03120306.xhp b/source/text/sbasic/shared/03120306.xhp index c79b292e58..354c43dddc 100644 --- a/source/text/sbasic/shared/03120306.xhp +++ b/source/text/sbasic/shared/03120306.xhp @@ -62,13 +62,13 @@ Sub ExampleUSDate Dim sInput As String Dim sUS_date As String - sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'") - sUS_date = Mid(sInput, 6, 2) - sUS_date = sUS_date & "/" - sUS_date = sUS_date & Right(sInput, 2) - sUS_date = sUS_date & "/" - sUS_date = sUS_date & Left(sInput, 4) - MsgBox sUS_date + sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'") + sUS_date = Mid(sInput, 6, 2) + sUS_date = sUS_date & "/" + sUS_date = sUS_date & Right(sInput, 2) + sUS_date = sUS_date & "/" + sUS_date = sUS_date & Left(sInput, 4) + MsgBox sUS_date End Sub diff --git a/source/text/sbasic/shared/03120307.xhp b/source/text/sbasic/shared/03120307.xhp index 049ca40a15..4f25d4a0cb 100644 --- a/source/text/sbasic/shared/03120307.xhp +++ b/source/text/sbasic/shared/03120307.xhp @@ -59,13 +59,13 @@ Sub ExampleUSDate Dim sInput As String Dim sUS_date As String - sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'") - sUS_date = Mid(sInput, 6, 2) - sUS_date = sUS_date & "/" - sUS_date = sUS_date & Right(sInput, 2) - sUS_date = sUS_date & "/" - sUS_date = sUS_date & Left(sInput, 4) - MsgBox sUS_date + sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'") + sUS_date = Mid(sInput, 6, 2) + sUS_date = sUS_date & "/" + sUS_date = sUS_date & Right(sInput, 2) + sUS_date = sUS_date & "/" + sUS_date = sUS_date & Left(sInput, 4) + MsgBox sUS_date End Sub diff --git a/source/text/sbasic/shared/03120308.xhp b/source/text/sbasic/shared/03120308.xhp index f5a48cae82..ee9fb54039 100644 --- a/source/text/sbasic/shared/03120308.xhp +++ b/source/text/sbasic/shared/03120308.xhp @@ -57,25 +57,25 @@ Sub ExampleRLSet Dim sVar As String Dim sExpr As String - sVar = String(40,"*") - sExpr = "SBX" - ' Right-align "SBX" in a 40-character string - ' Replace asterisks with spaces - RSet sVar = sExpr - Print ">"; sVar; "<" - sVar = String(5,"*") - sExpr = "123457896" - RSet sVar = sExpr - Print ">"; sVar; "<" - sVar = String(40,"*") - sExpr = "SBX" - ' Left-align "SBX" in a 40-character string - LSet sVar = sExpr - Print ">"; sVar; "<" - sVar = String(5,"*") - sExpr = "123456789" - LSet sVar = sExpr - Print ">"; sVar; "<" + sVar = String(40,"*") + sExpr = "SBX" + ' Right-align "SBX" in a 40-character string + ' Replace asterisks with spaces + RSet sVar = sExpr + Print ">"; sVar; "<" + sVar = String(5,"*") + sExpr = "123457896" + RSet sVar = sExpr + Print ">"; sVar; "<" + sVar = String(40,"*") + sExpr = "SBX" + ' Left-align "SBX" in a 40-character string + LSet sVar = sExpr + Print ">"; sVar; "<" + sVar = String(5,"*") + sExpr = "123456789" + LSet sVar = sExpr + Print ">"; sVar; "<" End Sub diff --git a/source/text/sbasic/shared/03120309.xhp b/source/text/sbasic/shared/03120309.xhp index 9cfc65767e..1b2167a80a 100644 --- a/source/text/sbasic/shared/03120309.xhp +++ b/source/text/sbasic/shared/03120309.xhp @@ -56,15 +56,15 @@ Sub ExampleSpaces Dim sText2 As String,sText As String,sOut As String - sText2 = " <*Las Vegas*> " - sOut = "'"+sText2 +"'"+ Chr(13) - sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " - sOut = sOut + "'"+sText +"'" + Chr(13) - sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" - sOut = sOut +"'"+ sText +"'" + Chr(13) - sText = Trim(sText2) ' sText = "<*Las Vegas*>" - sOut = sOut +"'"+ sText +"'" - MsgBox sOut + sText2 = " <*Las Vegas*> " + sOut = "'"+sText2 +"'"+ Chr(13) + sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " + sOut = sOut + "'"+sText +"'" + Chr(13) + sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + Chr(13) + sText = Trim(sText2) ' sText = "<*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + MsgBox sOut End Sub diff --git a/source/text/sbasic/shared/03120310.xhp b/source/text/sbasic/shared/03120310.xhp index 330c0c420b..e74cec2888 100644 --- a/source/text/sbasic/shared/03120310.xhp +++ b/source/text/sbasic/shared/03120310.xhp @@ -52,9 +52,9 @@ Sub ExampleLUCase Dim sVar As String - sVar = "Las Vegas" - Print LCase(sVar) ' returns "las vegas" - Print UCase(sVar) ' returns "LAS VEGAS" + sVar = "Las Vegas" + Print LCase(sVar) ' returns "las vegas" + Print UCase(sVar) ' returns "LAS VEGAS" End Sub diff --git a/source/text/sbasic/shared/03120311.xhp b/source/text/sbasic/shared/03120311.xhp index a8180acfdb..5a3efb8d95 100644 --- a/source/text/sbasic/shared/03120311.xhp +++ b/source/text/sbasic/shared/03120311.xhp @@ -55,15 +55,15 @@ Sub ExampleSpaces Dim sText2 As String,sText As String,sOut As String - sText2 = " <*Las Vegas*> " - sOut = "'"+sText2 +"'"+ Chr(13) - sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " - sOut = sOut + "'"+sText +"'" + Chr(13) - sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" - sOut = sOut +"'"+ sText +"'" + Chr(13) - sText = Trim(sText2) ' sText = "<*Las Vegas*>" - sOut = sOut +"'"+ sText +"'" - MsgBox sOut + sText2 = " <*Las Vegas*> " + sOut = "'"+sText2 +"'"+ Chr(13) + sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " + sOut = sOut + "'"+sText +"'" + Chr(13) + sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + Chr(13) + sText = Trim(sText2) ' sText = "<*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + MsgBox sOut End Sub diff --git a/source/text/sbasic/shared/03120314.xhp b/source/text/sbasic/shared/03120314.xhp index 40b37617a8..a45fa2febc 100644 --- a/source/text/sbasic/shared/03120314.xhp +++ b/source/text/sbasic/shared/03120314.xhp @@ -57,42 +57,42 @@ Dim a(3) Sub main() - a(0) = "ABCDE" - a(1) = 42 - a(2) = "MN" - a(3) = "X Y Z" - JStr = Join1() - Call Show(JStr, Split1(JStr)) - JStr = Join2() - Call Show(JStr, Split1(JStr)) - JStr = Join3() - Call Show(JStr, Split1(JStr)) + a(0) = "ABCDE" + a(1) = 42 + a(2) = "MN" + a(3) = "X Y Z" + JStr = Join1() + Call Show(JStr, Split1(JStr)) + JStr = Join2() + Call Show(JStr, Split1(JStr)) + JStr = Join3() + Call Show(JStr, Split1(JStr)) End Sub Function Join1() - Join1 = Join(a(), "abc") + Join1 = Join(a(), "abc") End Function Function Join2() - Join2 = Join(a(), ",") + Join2 = Join(a(), ",") End Function Function Join3() - Join3 = Join(a()) + Join3 = Join(a()) End Function Function Split1(aStr) - Split1 = Split(aStr, "D") + Split1 = Split(aStr, "D") End Function Sub Show(JoinStr, TheArray) - l = LBound(TheArray) - u = UBound(TheArray) - total$ = "=============================" + Chr$(13) + JoinStr + Chr$(13) + Chr$(13) - For i = l To u - total$ = total$ + TheArray(i) + Str(Len(TheArray(i))) + Chr$(13) - Next i - MsgBox total$ + l = LBound(TheArray) + u = UBound(TheArray) + total$ = "=============================" + Chr$(13) + JoinStr + Chr$(13) + Chr$(13) + For i = l To u + total$ = total$ + TheArray(i) + Str(Len(TheArray(i))) + Chr$(13) + Next i + MsgBox total$ End Sub
diff --git a/source/text/sbasic/shared/03120401.xhp b/source/text/sbasic/shared/03120401.xhp index e2007efda9..55420416da 100644 --- a/source/text/sbasic/shared/03120401.xhp +++ b/source/text/sbasic/shared/03120401.xhp @@ -61,9 +61,9 @@ Sub ExamplePosition Dim sInput As String Dim iPos As Integer - sInput = "Office" - iPos = Instr(sInput,"c") - Print iPos + sInput = "Office" + iPos = Instr(sInput,"c") + Print iPos End Sub diff --git a/source/text/sbasic/shared/03120403.xhp b/source/text/sbasic/shared/03120403.xhp index da4702125d..2368a4a8ff 100644 --- a/source/text/sbasic/shared/03120403.xhp +++ b/source/text/sbasic/shared/03120403.xhp @@ -71,9 +71,9 @@ Sub ExampleStrComp Dim iVar As Single Dim sVar As String - iVar = 123.123 - sVar = Str$(iVar) - MsgBox strcomp(sVar , Str$(iVar),1) + iVar = 123.123 + sVar = Str$(iVar) + MsgBox strcomp(sVar , Str$(iVar),1) End Sub diff --git a/source/text/sbasic/shared/03130500.xhp b/source/text/sbasic/shared/03130500.xhp index 359846fe5a..f07295a154 100644 --- a/source/text/sbasic/shared/03130500.xhp +++ b/source/text/sbasic/shared/03130500.xhp @@ -122,7 +122,7 @@ Example Sub ExampleShellForWin - Shell("c:\windows\calc.exe",2) + Shell("c:\windows\calc.exe",2) End Sub diff --git a/source/text/sbasic/shared/03130700.xhp b/source/text/sbasic/shared/03130700.xhp index 1339a01373..61b47a153c 100644 --- a/source/text/sbasic/shared/03130700.xhp +++ b/source/text/sbasic/shared/03130700.xhp @@ -52,10 +52,10 @@ Sub ExampleWait Dim lTick As Long - lTick = GetSystemTicks() - Wait 2000 - lTick = (GetSystemTicks() - lTick) - MsgBox "" & lTick & " Ticks" ,0,"The pause lasted" + lTick = GetSystemTicks() + Wait 2000 + lTick = (GetSystemTicks() - lTick) + MsgBox "" & lTick & " Ticks" ,0,"The pause lasted" End Sub diff --git a/source/text/sbasic/shared/03130800.xhp b/source/text/sbasic/shared/03130800.xhp index c900cc9e9c..23e3a7e788 100644 --- a/source/text/sbasic/shared/03130800.xhp +++ b/source/text/sbasic/shared/03130800.xhp @@ -55,9 +55,9 @@ Sub ExampleEnviron Dim sTemp As String - sTemp=Environ ("TEMP") - If sTemp = "" Then sTemp=Environ("TMP") - MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:" + sTemp=Environ ("TEMP") + If sTemp = "" Then sTemp=Environ("TMP") + MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:" End Sub diff --git a/source/text/sbasic/shared/03131000.xhp b/source/text/sbasic/shared/03131000.xhp index e028470d89..9b385c689c 100644 --- a/source/text/sbasic/shared/03131000.xhp +++ b/source/text/sbasic/shared/03131000.xhp @@ -50,8 +50,8 @@ Sub ExampleGetSolarVersion Dim sSep As String - sSep = GetSolarVersion - MsgBox sSep,64,"Version number of the solar technology" + sSep = GetSolarVersion + MsgBox sSep,64,"Version number of the solar technology" End Sub diff --git a/source/text/sbasic/shared/03131300.xhp b/source/text/sbasic/shared/03131300.xhp index cc15202054..c89d207d4c 100644 --- a/source/text/sbasic/shared/03131300.xhp +++ b/source/text/sbasic/shared/03131300.xhp @@ -49,7 +49,7 @@ Example: Sub ExamplePixelTwips - MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size" + MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size" End Sub diff --git a/source/text/sbasic/shared/03131400.xhp b/source/text/sbasic/shared/03131400.xhp index b3a8402003..8a8ca46201 100644 --- a/source/text/sbasic/shared/03131400.xhp +++ b/source/text/sbasic/shared/03131400.xhp @@ -49,7 +49,7 @@ Example: Sub ExamplePixelTwips - MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size" + MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size" End Sub diff --git a/source/text/sbasic/shared/03131600.xhp b/source/text/sbasic/shared/03131600.xhp index c974093d67..ff2a1075af 100644 --- a/source/text/sbasic/shared/03131600.xhp +++ b/source/text/sbasic/shared/03131600.xhp @@ -53,16 +53,16 @@ The following code uses a service to open a file open dialog: Sub Main - fName = FileOpenDialog ("Please select a file") - Print "file chosen: "+fName + fName = FileOpenDialog ("Please select a file") + Print "file chosen: "+fName End Sub Function FileOpenDialog(title As String) As String - filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker") - filepicker.Title = title - filepicker.execute() - files = filepicker.getFiles() - FileOpenDialog=files(0) + filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker") + filepicker.Title = title + filepicker.execute() + files = filepicker.getFiles() + FileOpenDialog=files(0) End Function diff --git a/source/text/sbasic/shared/03132000.xhp b/source/text/sbasic/shared/03132000.xhp index 70247182e4..ccb0d6ffa7 100644 --- a/source/text/sbasic/shared/03132000.xhp +++ b/source/text/sbasic/shared/03132000.xhp @@ -104,23 +104,23 @@ An event structure type that contains information about an event exists for every Listener type. When a Listener method is called, an instance of this event is passed to the method as a parameter. Basic Listener methods can also call these event objects, so long as the appropriate parameter is passed in the Sub declaration. For example: Sub ContListener_disposing( oEvent ) - MsgBox "disposing" - MsgBox oEvent.Dbg_Properties + MsgBox "disposing" + MsgBox oEvent.Dbg_Properties End Sub Sub ContListener_elementInserted( oEvent ) - MsgBox "elementInserted" - MsgBox oEvent.Dbg_Properties + MsgBox "elementInserted" + MsgBox oEvent.Dbg_Properties End Sub Sub ContListener_elementRemoved( oEvent ) - MsgBox "elementRemoved" - MsgBox oEvent.Dbg_Properties + MsgBox "elementRemoved" + MsgBox oEvent.Dbg_Properties End Sub Sub ContListener_elementReplaced( oEvent ) - MsgBox "elementReplaced" - MsgBox oEvent.Dbg_Properties + MsgBox "elementReplaced" + MsgBox oEvent.Dbg_Properties End Sub You do not need to include the parameter of an event object if the object is not used: diff --git a/source/text/sbasic/shared/03132200.xhp b/source/text/sbasic/shared/03132200.xhp index 50bc6007ba..69027b5d92 100644 --- a/source/text/sbasic/shared/03132200.xhp +++ b/source/text/sbasic/shared/03132200.xhp @@ -49,10 +49,10 @@ Sub Main ' updates the "Table of Contents" in a text doc Dim allindexes, index As Object - allindexes = ThisComponent.getDocumentIndexes() - index = allindexes.getByName("Table of Contents1") - ' use the default name for Table of Contents and a 1 - index.update() + allindexes = ThisComponent.getDocumentIndexes() + index = allindexes.getByName("Table of Contents1") + ' use the default name for Table of Contents and a 1 + index.update() End Sub diff --git a/source/text/sbasic/shared/03132400.xhp b/source/text/sbasic/shared/03132400.xhp index d586a65866..e0d03d9f4e 100644 --- a/source/text/sbasic/shared/03132400.xhp +++ b/source/text/sbasic/shared/03132400.xhp @@ -47,13 +47,13 @@ Example: Type address - Name1 As String - City As String + Name1 As String + City As String End Type Sub main - myaddress = CreateObject("address") - MsgBox IsObject(myaddress) + myaddress = CreateObject("address") + MsgBox IsObject(myaddress) End Sub -- cgit