diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-16 15:41:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-16 16:10:07 +0100 |
commit | 8ff2c5f505ed1f29901313692b8e3ca5d100d225 (patch) | |
tree | 0c586d77142e1bb7e4c72ceb8d87f39c25a974a3 | |
parent | 091a51e1c78946aa4f2e7b13c31e5b08cec3c230 (diff) |
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
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 @@ <paragraph id="par_idm1340976400" role="bascode" localize="false" xml-lang="en-US">' ***** Module1 *****</paragraph> <paragraph id="par_idm1340975168" role="bascode" localize="false" xml-lang="en-US">Private myText As String</paragraph> <paragraph id="par_idm1340973920" role="bascode" localize="false" xml-lang="en-US">Sub initMyText</paragraph> -<paragraph id="par_id9475997" role="bascode" xml-lang="en-US"> myText = "Hello"</paragraph> -<paragraph id="par_id6933500" role="bascode" xml-lang="en-US"> Print "In module1 : ", myText</paragraph> +<paragraph id="par_id9475997" role="bascode" xml-lang="en-US"> myText = "Hello"</paragraph> +<paragraph id="par_id6933500" role="bascode" xml-lang="en-US"> Print "In module1 : ", myText</paragraph> <paragraph id="par_idm1340970208" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340968976" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340967728" role="bascode" localize="false" xml-lang="en-US">' ***** Module2 *****</paragraph> <paragraph id="par_idm1340966496" role="bascode" localize="false" xml-lang="en-US">'Option Explicit</paragraph> <paragraph id="par_idm1340965264" role="bascode" localize="false" xml-lang="en-US">Sub demoBug</paragraph> -<paragraph id="par_idm1340964032" role="bascode" localize="false" xml-lang="en-US"> CompatibilityMode( true )</paragraph> -<paragraph id="par_idm1340962784" role="bascode" localize="false" xml-lang="en-US"> initMyText</paragraph> -<paragraph id="par_id4104129" role="bascode" xml-lang="en-US"> ' Now returns empty string</paragraph> -<paragraph id="par_id7906125" role="bascode" xml-lang="en-US"> ' (or rises error for Option Explicit)</paragraph> -<paragraph id="par_id8055970" role="bascode" xml-lang="en-US"> Print "Now in module2 : ", myText</paragraph> +<paragraph id="par_idm1340964032" role="bascode" localize="false" xml-lang="en-US"> CompatibilityMode( true )</paragraph> +<paragraph id="par_idm1340962784" role="bascode" localize="false" xml-lang="en-US"> initMyText</paragraph> +<paragraph id="par_id4104129" role="bascode" xml-lang="en-US"> ' Now returns empty string</paragraph> +<paragraph id="par_id7906125" role="bascode" xml-lang="en-US"> ' (or rises error for Option Explicit)</paragraph> +<paragraph id="par_id8055970" role="bascode" xml-lang="en-US"> Print "Now in module2 : ", myText</paragraph> <paragraph id="par_idm1340957792" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> 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 @@ <paragraph id="hd_id3150715" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340869408" role="bascode" localize="false" xml-lang="en-US">Sub ExampleMsgBox</paragraph> -<paragraph id="par_id3150327" role="bascode" xml-lang="en-US"> Const sText1 = "An unexpected error occurred."</paragraph> -<paragraph id="par_id3146912" role="bascode" xml-lang="en-US"> Const sText2 = "The program execution will continue, however."</paragraph> -<paragraph id="par_id3154757" role="bascode" xml-lang="en-US"> Const sText3 = "Error"</paragraph> -<paragraph id="par_idm1340862944" role="bascode" localize="false" xml-lang="en-US"> MsgBox(sText1 + Chr(13) + sText2,16,sText3)</paragraph> +<paragraph id="par_id3150327" role="bascode" xml-lang="en-US"> Const sText1 = "An unexpected error occurred."</paragraph> +<paragraph id="par_id3146912" role="bascode" xml-lang="en-US"> Const sText2 = "The program execution will continue, however."</paragraph> +<paragraph id="par_id3154757" role="bascode" xml-lang="en-US"> Const sText3 = "Error"</paragraph> +<paragraph id="par_idm1340862944" role="bascode" localize="false" xml-lang="en-US"> MsgBox(sText1 + Chr(13) + sText2,16,sText3)</paragraph> <paragraph id="par_idm1340861680" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340837456" role="bascode" localize="false" xml-lang="en-US">Sub ExampleMsgBox</paragraph> <paragraph id="par_idm1340836224" role="bascode" localize="false" xml-lang="en-US">Dim sVar As Integer</paragraph> -<paragraph id="par_id3151278" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas")</paragraph> -<paragraph id="par_id3149034" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas",1)</paragraph> -<paragraph id="par_id3166424" role="bascode" xml-lang="en-US"> sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title")</paragraph> +<paragraph id="par_id3151278" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas")</paragraph> +<paragraph id="par_id3149034" role="bascode" xml-lang="en-US"> sVar = MsgBox("Las Vegas",1)</paragraph> +<paragraph id="par_id3166424" role="bascode" xml-lang="en-US"> sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title")</paragraph> <paragraph id="par_idm1340829728" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <case select="WIN"> <bascode> <paragraph id="par_idm1073161760" role="bascode" localize="false" xml-lang="en-US">Sub ExamplePrint</paragraph> -<paragraph id="par_idm1073160528" role="bascode" localize="false" xml-lang="en-US"> Print "ABC"</paragraph> -<paragraph id="par_idm1073159296" role="bascode" localize="false" xml-lang="en-US"> Print "ABC","123"</paragraph> -<paragraph id="par_idm1073129856" role="bascode" localize="false" xml-lang="en-US"> i = FreeFile()</paragraph> -<paragraph id="par_idm1073128624" role="bascode" localize="false" xml-lang="en-US"> Open "C:\Temp.txt" For Output As i</paragraph> -<paragraph id="par_idm1073127376" role="bascode" localize="false" xml-lang="en-US"> Print #i, "ABC"</paragraph> -<paragraph id="par_idm1073126144" role="bascode" localize="false" xml-lang="en-US"> Close #i</paragraph> +<paragraph id="par_idm1073160528" role="bascode" localize="false" xml-lang="en-US"> Print "ABC"</paragraph> +<paragraph id="par_idm1073159296" role="bascode" localize="false" xml-lang="en-US"> Print "ABC","123"</paragraph> +<paragraph id="par_idm1073129856" role="bascode" localize="false" xml-lang="en-US"> i = FreeFile()</paragraph> +<paragraph id="par_idm1073128624" role="bascode" localize="false" xml-lang="en-US"> Open "C:\Temp.txt" For Output As i</paragraph> +<paragraph id="par_idm1073127376" role="bascode" localize="false" xml-lang="en-US"> Print #i, "ABC"</paragraph> +<paragraph id="par_idm1073126144" role="bascode" localize="false" xml-lang="en-US"> Close #i</paragraph> <paragraph id="par_idm1073124912" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </case> <default> <bascode> <paragraph id="par_idm1073122912" role="bascode" localize="false" xml-lang="en-US">Sub ExamplePrint</paragraph> -<paragraph id="par_idm1073121680" role="bascode" localize="false" xml-lang="en-US"> Print "ABC"</paragraph> -<paragraph id="par_idm1073120448" role="bascode" localize="false" xml-lang="en-US"> Print "ABC","123"</paragraph> -<paragraph id="par_idm1073119216" role="bascode" localize="false" xml-lang="en-US"> i = FreeFile()</paragraph> -<paragraph id="par_idm1073117984" role="bascode" localize="false" xml-lang="en-US"> Open "~/temp.txt" For Output As i</paragraph> -<paragraph id="par_idm1073116736" role="bascode" localize="false" xml-lang="en-US"> Print #i, "ABC"</paragraph> -<paragraph id="par_idm1073115504" role="bascode" localize="false" xml-lang="en-US"> Close #i</paragraph> +<paragraph id="par_idm1073121680" role="bascode" localize="false" xml-lang="en-US"> Print "ABC"</paragraph> +<paragraph id="par_idm1073120448" role="bascode" localize="false" xml-lang="en-US"> Print "ABC","123"</paragraph> +<paragraph id="par_idm1073119216" role="bascode" localize="false" xml-lang="en-US"> i = FreeFile()</paragraph> +<paragraph id="par_idm1073117984" role="bascode" localize="false" xml-lang="en-US"> Open "~/temp.txt" For Output As i</paragraph> +<paragraph id="par_idm1073116736" role="bascode" localize="false" xml-lang="en-US"> Print #i, "ABC"</paragraph> +<paragraph id="par_idm1073115504" role="bascode" localize="false" xml-lang="en-US"> Close #i</paragraph> <paragraph id="par_idm1073114272" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </default> 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 @@ <bascode> <paragraph id="par_idm1341285584" role="bascode" localize="false" xml-lang="en-US">Sub ExampleInputBox</paragraph> <paragraph id="par_idm1341284352" role="bascode" localize="false" xml-lang="en-US">Dim sText As String</paragraph> -<paragraph id="par_id3154367" role="bascode" xml-lang="en-US"> sText = InputBox ("Please enter a phrase:","Dear User")</paragraph> -<paragraph id="par_id3151042" role="bascode" xml-lang="en-US"> MsgBox ( sText , 64, "Confirmation of phrase")</paragraph> +<paragraph id="par_id3154367" role="bascode" xml-lang="en-US"> sText = InputBox ("Please enter a phrase:","Dear User")</paragraph> +<paragraph id="par_id3151042" role="bascode" xml-lang="en-US"> MsgBox ( sText , 64, "Confirmation of phrase")</paragraph> <paragraph id="par_idm1341279568" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1073171488" role="bascode" localize="false" xml-lang="en-US">Sub ExampleColor</paragraph> <paragraph id="par_idm1073170256" role="bascode" localize="false" xml-lang="en-US">Dim lVar As Long</paragraph> -<paragraph id="par_idm1073169024" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> -<paragraph id="par_id3154012" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " consists of:" & Chr(13) &_</paragraph> -<paragraph id="par_id3148645" role="bascode" xml-lang="en-US"> "red= " & Red(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3159155" role="bascode" xml-lang="en-US"> "green= " & Green(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3147319" role="bascode" xml-lang="en-US"> "blue= " & Blue(lVar) & Chr(13) , 64,"colors"</paragraph> +<paragraph id="par_idm1073169024" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> +<paragraph id="par_id3154012" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " consists of:" & Chr(13) &_</paragraph> +<paragraph id="par_id3148645" role="bascode" xml-lang="en-US"> "red= " & Red(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3159155" role="bascode" xml-lang="en-US"> "green= " & Green(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3147319" role="bascode" xml-lang="en-US"> "blue= " & Blue(lVar) & Chr(13) , 64,"colors"</paragraph> <paragraph id="par_idm1073160528" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341170976" role="bascode" localize="false" xml-lang="en-US">Sub ExampleColor</paragraph> <paragraph id="par_idm1341169744" role="bascode" localize="false" xml-lang="en-US">Dim lVar As Long</paragraph> -<paragraph id="par_idm1341168512" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> -<paragraph id="par_id3151117" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " contains the components:" & Chr(13) &_</paragraph> -<paragraph id="par_id3153951" role="bascode" xml-lang="en-US"> "red = " & red(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> "green = " & green(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3154730" role="bascode" xml-lang="en-US"> "blue = " & blue(lVar) & Chr(13) , 64,"colors"</paragraph> +<paragraph id="par_idm1341168512" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> +<paragraph id="par_id3151117" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " contains the components:" & Chr(13) &_</paragraph> +<paragraph id="par_id3153951" role="bascode" xml-lang="en-US"> "red = " & red(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> "green = " & green(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3154730" role="bascode" xml-lang="en-US"> "blue = " & blue(lVar) & Chr(13) , 64,"colors"</paragraph> <paragraph id="par_idm1341159952" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341092848" role="bascode" localize="false" xml-lang="en-US">Sub ExampleColor</paragraph> <paragraph id="par_idm1341091616" role="bascode" localize="false" xml-lang="en-US">Dim lVar As Long</paragraph> -<paragraph id="par_idm1341090384" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> -<paragraph id="par_id3147435" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " consists of:" & Chr(13) &_</paragraph> -<paragraph id="par_id3155306" role="bascode" xml-lang="en-US"> "red= " & red(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> "green= " & green(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3147397" role="bascode" xml-lang="en-US"> "blue= " & blue(lVar) & Chr(13) , 64,"colors"</paragraph> +<paragraph id="par_idm1341090384" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> +<paragraph id="par_id3147435" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " consists of:" & Chr(13) &_</paragraph> +<paragraph id="par_id3155306" role="bascode" xml-lang="en-US"> "red= " & red(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> "green= " & green(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3147397" role="bascode" xml-lang="en-US"> "blue= " & blue(lVar) & Chr(13) , 64,"colors"</paragraph> <paragraph id="par_idm1341081888" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341247424" role="bascode" localize="false" xml-lang="en-US">Sub ExampleQBColor</paragraph> <paragraph id="par_idm1341246192" role="bascode" localize="false" xml-lang="en-US">Dim iColor As Integer</paragraph> <paragraph id="par_idm1341244960" role="bascode" localize="false" xml-lang="en-US">Dim sText As String</paragraph> -<paragraph id="par_idm1341243728" role="bascode" localize="false" xml-lang="en-US"> iColor = 7</paragraph> -<paragraph id="par_idm1341242496" role="bascode" localize="false" xml-lang="en-US"> sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) )</paragraph> -<paragraph id="par_id3149566" role="bascode" xml-lang="en-US"> MsgBox stext,0,"Color " & iColor</paragraph> +<paragraph id="par_idm1341243728" role="bascode" localize="false" xml-lang="en-US"> iColor = 7</paragraph> +<paragraph id="par_idm1341242496" role="bascode" localize="false" xml-lang="en-US"> sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) )</paragraph> +<paragraph id="par_id3149566" role="bascode" xml-lang="en-US"> MsgBox stext,0,"Color " & iColor</paragraph> <paragraph id="par_idm1341239392" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340938032" role="bascode" localize="false" xml-lang="en-US">Sub ExampleColor</paragraph> <paragraph id="par_idm1340936800" role="bascode" localize="false" xml-lang="en-US">Dim lVar As Long</paragraph> -<paragraph id="par_idm1340935568" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> -<paragraph id="par_id3145647" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " consists of:" & Chr(13) &_</paragraph> -<paragraph id="par_id3154491" role="bascode" xml-lang="en-US"> "red= " & red(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3149401" role="bascode" xml-lang="en-US"> "green= " & green(lVar) & Chr(13)&_</paragraph> -<paragraph id="par_id3150716" role="bascode" xml-lang="en-US"> "blue= " & blue(lVar) & Chr(13) , 64,"colors"</paragraph> +<paragraph id="par_idm1340935568" role="bascode" localize="false" xml-lang="en-US"> lVar = rgb(128,0,200)</paragraph> +<paragraph id="par_id3145647" role="bascode" xml-lang="en-US"> MsgBox "The color " & lVar & " consists of:" & Chr(13) &_</paragraph> +<paragraph id="par_id3154491" role="bascode" xml-lang="en-US"> "red= " & red(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3149401" role="bascode" xml-lang="en-US"> "green= " & green(lVar) & Chr(13)&_</paragraph> +<paragraph id="par_id3150716" role="bascode" xml-lang="en-US"> "blue= " & blue(lVar) & Chr(13) , 64,"colors"</paragraph> <paragraph id="par_idm1340927072" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341287920" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1341286688" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> <paragraph id="par_idm1341285456" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph> -<paragraph id="par_idm1341284224" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341282976" role="bascode" localize="false" xml-lang="en-US"> sMsg = ""</paragraph> -<paragraph id="par_idm1341281744" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341280512" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3153727" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph> -<paragraph id="par_id3147350" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph> -<paragraph id="par_idm1340923792" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1340922560" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1340921328" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> -<paragraph id="par_idm1340920080" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph> -<paragraph id="par_idm1340918832" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1340917584" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1340916336" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> -<paragraph id="par_idm1340915072" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1340913840" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> -<paragraph id="par_idm1340912608" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1340911376" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> +<paragraph id="par_idm1341284224" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341282976" role="bascode" localize="false" xml-lang="en-US"> sMsg = ""</paragraph> +<paragraph id="par_idm1341281744" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341280512" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3153727" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph> +<paragraph id="par_id3147350" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph> +<paragraph id="par_idm1340923792" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1340922560" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1340921328" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> +<paragraph id="par_idm1340920080" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph> +<paragraph id="par_idm1340918832" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1340917584" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1340916336" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> +<paragraph id="par_idm1340915072" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1340913840" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> +<paragraph id="par_idm1340912608" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1340911376" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> <paragraph id="par_idm1340910144" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341586656" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1341585424" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> <paragraph id="par_idm1341584192" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph> -<paragraph id="par_idm1341582960" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341581712" role="bascode" localize="false" xml-lang="en-US"> sMsg = ""</paragraph> -<paragraph id="par_idm1341580480" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341579248" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3155416" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph> -<paragraph id="par_id3153416" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph> -<paragraph id="par_idm1341574464" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341573232" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341572000" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As #iNumber</paragraph> -<paragraph id="par_idm1341570752" role="bascode" localize="false" xml-lang="en-US"> While Not eof(#iNumber)</paragraph> -<paragraph id="par_idm1341569504" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1341568256" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1341567008" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> -<paragraph id="par_idm1341565744" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341564512" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> -<paragraph id="par_idm1341563280" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341562048" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> +<paragraph id="par_idm1341582960" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341581712" role="bascode" localize="false" xml-lang="en-US"> sMsg = ""</paragraph> +<paragraph id="par_idm1341580480" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341579248" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3155416" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph> +<paragraph id="par_id3153416" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph> +<paragraph id="par_idm1341574464" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341573232" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341572000" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As #iNumber</paragraph> +<paragraph id="par_idm1341570752" role="bascode" localize="false" xml-lang="en-US"> While Not eof(#iNumber)</paragraph> +<paragraph id="par_idm1341569504" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1341568256" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1341567008" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> +<paragraph id="par_idm1341565744" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341564512" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> +<paragraph id="par_idm1341563280" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341562048" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> <paragraph id="par_idm1341560816" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341595104" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1341593872" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> <paragraph id="par_idm1341592640" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph> -<paragraph id="par_idm1341591408" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341590160" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341588928" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3154705" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> -<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> Print #iNumber, "This is another line of text"</paragraph> -<paragraph id="par_idm1341584144" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341582912" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341581680" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> -<paragraph id="par_idm1341580432" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph> -<paragraph id="par_idm1341579184" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1341577936" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1341576688" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> -<paragraph id="par_idm1341575424" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341574192" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> -<paragraph id="par_idm1341572960" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341571728" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> +<paragraph id="par_idm1341591408" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341590160" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341588928" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3154705" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> +<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> Print #iNumber, "This is another line of text"</paragraph> +<paragraph id="par_idm1341584144" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341582912" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341581680" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> +<paragraph id="par_idm1341580432" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph> +<paragraph id="par_idm1341579184" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1341577936" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1341576688" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> +<paragraph id="par_idm1341575424" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341574192" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> +<paragraph id="par_idm1341572960" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341571728" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> <paragraph id="par_idm1341570496" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1207241360" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer</paragraph> <paragraph id="par_idm1207240256" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1207239152" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> -<paragraph id="par_idm1207238048" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1207236896" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1207235792" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3148455" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a new line of text"</paragraph> -<paragraph id="par_idm1207232992" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1207231888" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1207230784" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> -<paragraph id="par_idm1207229632" role="bascode" localize="false" xml-lang="en-US"> For iCount = 1 To 5</paragraph> -<paragraph id="par_idm1207228528" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1207227376" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1207226224" role="bascode" localize="false" xml-lang="en-US"> Rem</paragraph> -<paragraph id="par_idm1207225120" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1207224016" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_idm1207222912" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1207221808" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> +<paragraph id="par_idm1207238048" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1207236896" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1207235792" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3148455" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a new line of text"</paragraph> +<paragraph id="par_idm1207232992" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1207231888" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1207230784" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> +<paragraph id="par_idm1207229632" role="bascode" localize="false" xml-lang="en-US"> For iCount = 1 To 5</paragraph> +<paragraph id="par_idm1207228528" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1207227376" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1207226224" role="bascode" localize="false" xml-lang="en-US"> Rem</paragraph> +<paragraph id="par_idm1207225120" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1207224016" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_idm1207222912" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1207221808" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> <paragraph id="par_idm1207220704" role="bascode" localize="false" xml-lang="en-US">ErrorHandler:</paragraph> -<paragraph id="par_idm1207219600" role="bascode" localize="false" xml-lang="en-US"> Reset</paragraph> -<paragraph id="par_id3163805" role="bascode" xml-lang="en-US"> MsgBox "All files will be closed",0,"Error"</paragraph> +<paragraph id="par_idm1207219600" role="bascode" localize="false" xml-lang="en-US"> Reset</paragraph> +<paragraph id="par_id3163805" role="bascode" xml-lang="en-US"> MsgBox "All files will be closed",0,"Error"</paragraph> <paragraph id="par_idm1207216848" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340773632" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph> <paragraph id="par_id3155307" role="bascode" xml-lang="en-US">Dim sText As Variant ' Must be a variant</paragraph> <paragraph id="par_idm1340770608" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> -<paragraph id="par_idm1340769376" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1340768128" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1340766896" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> -<paragraph id="par_id3149411" role="bascode" xml-lang="en-US"> Seek #iNumber,1 ' Position at beginning</paragraph> -<paragraph id="par_id3153158" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the first line of text" ' Fill line with text</paragraph> -<paragraph id="par_id3148457" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the second line of text"</paragraph> -<paragraph id="par_id3150715" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the third line of text"</paragraph> -<paragraph id="par_idm1340758576" role="bascode" localize="false" xml-lang="en-US"> Seek #iNumber,2</paragraph> -<paragraph id="par_idm1340757344" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,,sText</paragraph> -<paragraph id="par_idm1340756112" role="bascode" localize="false" xml-lang="en-US"> Print sText</paragraph> -<paragraph id="par_idm1340754880" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1340753648" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1340752416" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> -<paragraph id="par_idm1340751152" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> -<paragraph id="par_id3155938" role="bascode" xml-lang="en-US"> Put #iNumber,,"This is a new text"</paragraph> -<paragraph id="par_idm1340748176" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,1,sText</paragraph> -<paragraph id="par_idm1340746928" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> -<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> Put #iNumber,20,"This is the text in record 20"</paragraph> -<paragraph id="par_idm1340743936" role="bascode" localize="false" xml-lang="en-US"> Print Lof(#iNumber)</paragraph> -<paragraph id="par_idm1340742704" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1340769376" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1340768128" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1340766896" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> +<paragraph id="par_id3149411" role="bascode" xml-lang="en-US"> Seek #iNumber,1 ' Position at beginning</paragraph> +<paragraph id="par_id3153158" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the first line of text" ' Fill line with text</paragraph> +<paragraph id="par_id3148457" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the second line of text"</paragraph> +<paragraph id="par_id3150715" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the third line of text"</paragraph> +<paragraph id="par_idm1340758576" role="bascode" localize="false" xml-lang="en-US"> Seek #iNumber,2</paragraph> +<paragraph id="par_idm1340757344" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,,sText</paragraph> +<paragraph id="par_idm1340756112" role="bascode" localize="false" xml-lang="en-US"> Print sText</paragraph> +<paragraph id="par_idm1340754880" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1340753648" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1340752416" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> +<paragraph id="par_idm1340751152" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> +<paragraph id="par_id3155938" role="bascode" xml-lang="en-US"> Put #iNumber,,"This is a new text"</paragraph> +<paragraph id="par_idm1340748176" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,1,sText</paragraph> +<paragraph id="par_idm1340746928" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> +<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> Put #iNumber,20,"This is the text in record 20"</paragraph> +<paragraph id="par_idm1340743936" role="bascode" localize="false" xml-lang="en-US"> Print Lof(#iNumber)</paragraph> +<paragraph id="par_idm1340742704" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> <paragraph id="par_idm1340741472" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340593776" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1340592544" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> <paragraph id="par_idm1340591312" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph> -<paragraph id="par_idm1340590080" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1340588832" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1340587600" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3147124" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> -<paragraph id="par_id3153415" role="bascode" xml-lang="en-US"> Print #iNumber, "This is another line of text"</paragraph> -<paragraph id="par_idm1340582816" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1340581584" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1340580352" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> -<paragraph id="par_idm1340579104" role="bascode" localize="false" xml-lang="en-US"> While Not EOF(iNumber)</paragraph> -<paragraph id="par_idm1340577856" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1340576608" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1340575360" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> -<paragraph id="par_idm1340574096" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1340572864" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> -<paragraph id="par_idm1340571632" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1340570400" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> +<paragraph id="par_idm1340590080" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1340588832" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1340587600" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3147124" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> +<paragraph id="par_id3153415" role="bascode" xml-lang="en-US"> Print #iNumber, "This is another line of text"</paragraph> +<paragraph id="par_idm1340582816" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1340581584" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1340580352" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> +<paragraph id="par_idm1340579104" role="bascode" localize="false" xml-lang="en-US"> While Not EOF(iNumber)</paragraph> +<paragraph id="par_idm1340577856" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1340576608" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1340575360" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> +<paragraph id="par_idm1340574096" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1340572864" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> +<paragraph id="par_idm1340571632" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1340570400" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> <paragraph id="par_idm1340569168" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341565952" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph> <paragraph id="par_id3154729" role="bascode" xml-lang="en-US">Dim sText As Variant ' Must be a variant type</paragraph> <paragraph id="par_idm1341562976" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> -<paragraph id="par_idm1341561744" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341560496" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341559264" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> -<paragraph id="par_id3156278" role="bascode" xml-lang="en-US"> Seek #iNumber,1 ' Position To start writing</paragraph> -<paragraph id="par_id3153711" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the first line of text" ' Fill line with text</paragraph> -<paragraph id="par_id3155446" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the second line of text"</paragraph> -<paragraph id="par_id3154255" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the third line of text"</paragraph> -<paragraph id="par_idm1341550944" role="bascode" localize="false" xml-lang="en-US"> Seek #iNumber,2</paragraph> -<paragraph id="par_idm1341549712" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,,sText</paragraph> -<paragraph id="par_idm1341548480" role="bascode" localize="false" xml-lang="en-US"> Print sText</paragraph> -<paragraph id="par_idm1341547248" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341546016" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341544784" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> -<paragraph id="par_idm1341543520" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> -<paragraph id="par_id3150940" role="bascode" xml-lang="en-US"> Put #iNumber,,"This is new text"</paragraph> -<paragraph id="par_idm1341540544" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,1,sText</paragraph> -<paragraph id="par_idm1341539296" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> -<paragraph id="par_id3159102" role="bascode" xml-lang="en-US"> Put #iNumber,20,"This is the text in record 20"</paragraph> -<paragraph id="par_idm1341536304" role="bascode" localize="false" xml-lang="en-US"> Print Lof(#iNumber)</paragraph> -<paragraph id="par_idm1341535072" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341561744" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341560496" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341559264" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> +<paragraph id="par_id3156278" role="bascode" xml-lang="en-US"> Seek #iNumber,1 ' Position To start writing</paragraph> +<paragraph id="par_id3153711" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the first line of text" ' Fill line with text</paragraph> +<paragraph id="par_id3155446" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the second line of text"</paragraph> +<paragraph id="par_id3154255" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the third line of text"</paragraph> +<paragraph id="par_idm1341550944" role="bascode" localize="false" xml-lang="en-US"> Seek #iNumber,2</paragraph> +<paragraph id="par_idm1341549712" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,,sText</paragraph> +<paragraph id="par_idm1341548480" role="bascode" localize="false" xml-lang="en-US"> Print sText</paragraph> +<paragraph id="par_idm1341547248" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341546016" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341544784" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph> +<paragraph id="par_idm1341543520" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> +<paragraph id="par_id3150940" role="bascode" xml-lang="en-US"> Put #iNumber,,"This is new text"</paragraph> +<paragraph id="par_idm1341540544" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,1,sText</paragraph> +<paragraph id="par_idm1341539296" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph> +<paragraph id="par_id3159102" role="bascode" xml-lang="en-US"> Put #iNumber,20,"This is the text in record 20"</paragraph> +<paragraph id="par_idm1341536304" role="bascode" localize="false" xml-lang="en-US"> Print Lof(#iNumber)</paragraph> +<paragraph id="par_idm1341535072" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> <paragraph id="par_idm1341533840" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340911536" role="bascode" localize="false" xml-lang="en-US">Sub ExampleWrite</paragraph> <paragraph id="par_idm1340910304" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer</paragraph> <paragraph id="par_idm1340909072" role="bascode" localize="false" xml-lang="en-US">Dim sValue As String</paragraph> -<paragraph id="par_idm1340907840" role="bascode" localize="false" xml-lang="en-US"> iCount = Freefile</paragraph> -<paragraph id="par_idm1340906608" role="bascode" localize="false" xml-lang="en-US"> Open "C:\data.txt" For Output As iCount</paragraph> -<paragraph id="par_idm1340905344" role="bascode" localize="false" xml-lang="en-US"> sValue = "Hamburg"</paragraph> -<paragraph id="par_idm1340904112" role="bascode" localize="false" xml-lang="en-US"> Write #iCount,sValue,200</paragraph> -<paragraph id="par_idm1340902864" role="bascode" localize="false" xml-lang="en-US"> sValue = "New York"</paragraph> -<paragraph id="par_idm1340901632" role="bascode" localize="false" xml-lang="en-US"> Write #iCount,sValue,300</paragraph> -<paragraph id="par_idm1340900384" role="bascode" localize="false" xml-lang="en-US"> sValue = "Miami"</paragraph> -<paragraph id="par_idm1340899152" role="bascode" localize="false" xml-lang="en-US"> Write #iCount,sValue,450</paragraph> -<paragraph id="par_idm1340897904" role="bascode" localize="false" xml-lang="en-US"> Close #iCount</paragraph> +<paragraph id="par_idm1340907840" role="bascode" localize="false" xml-lang="en-US"> iCount = Freefile</paragraph> +<paragraph id="par_idm1340906608" role="bascode" localize="false" xml-lang="en-US"> Open "C:\data.txt" For Output As iCount</paragraph> +<paragraph id="par_idm1340905344" role="bascode" localize="false" xml-lang="en-US"> sValue = "Hamburg"</paragraph> +<paragraph id="par_idm1340904112" role="bascode" localize="false" xml-lang="en-US"> Write #iCount,sValue,200</paragraph> +<paragraph id="par_idm1340902864" role="bascode" localize="false" xml-lang="en-US"> sValue = "New York"</paragraph> +<paragraph id="par_idm1340901632" role="bascode" localize="false" xml-lang="en-US"> Write #iCount,sValue,300</paragraph> +<paragraph id="par_idm1340900384" role="bascode" localize="false" xml-lang="en-US"> sValue = "Miami"</paragraph> +<paragraph id="par_idm1340899152" role="bascode" localize="false" xml-lang="en-US"> Write #iCount,sValue,450</paragraph> +<paragraph id="par_idm1340897904" role="bascode" localize="false" xml-lang="en-US"> Close #iCount</paragraph> <paragraph id="par_idm1340896672" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341589552" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1341588320" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> <paragraph id="par_idm1341587088" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph> -<paragraph id="par_idm1341585856" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341584608" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341583376" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3153360" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph> -<paragraph id="par_id3148797" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph> -<paragraph id="par_idm1341578592" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341577360" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341576128" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> -<paragraph id="par_idm1341574880" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph> -<paragraph id="par_idm1341573632" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1341572384" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1341571136" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> -<paragraph id="par_idm1341569872" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341568640" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> -<paragraph id="par_idm1341567408" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341566176" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> +<paragraph id="par_idm1341585856" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341584608" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341583376" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3153360" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph> +<paragraph id="par_id3148797" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph> +<paragraph id="par_idm1341578592" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341577360" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341576128" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> +<paragraph id="par_idm1341574880" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph> +<paragraph id="par_idm1341573632" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1341572384" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1341571136" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg & sLine & chr(13)</paragraph> +<paragraph id="par_idm1341569872" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341568640" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph> +<paragraph id="par_idm1341567408" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341566176" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph> <paragraph id="par_idm1341564944" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341266032" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChDir</paragraph> <paragraph id="par_idm1341264800" role="bascode" localize="false" xml-lang="en-US">Dim sDir1 As String , sDir2 As String</paragraph> -<paragraph id="par_idm1341263552" role="bascode" localize="false" xml-lang="en-US"> sDir1 = "c:\Test"</paragraph> -<paragraph id="par_idm1341262320" role="bascode" localize="false" xml-lang="en-US"> sDir2 = "d:\Private"</paragraph> -<paragraph id="par_idm1341261072" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir1 )</paragraph> -<paragraph id="par_idm1341259840" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> -<paragraph id="par_idm1341258608" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir2 )</paragraph> -<paragraph id="par_idm1341257376" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> +<paragraph id="par_idm1341263552" role="bascode" localize="false" xml-lang="en-US"> sDir1 = "c:\Test"</paragraph> +<paragraph id="par_idm1341262320" role="bascode" localize="false" xml-lang="en-US"> sDir2 = "d:\Private"</paragraph> +<paragraph id="par_idm1341261072" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir1 )</paragraph> +<paragraph id="par_idm1341259840" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> +<paragraph id="par_idm1341258608" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir2 )</paragraph> +<paragraph id="par_idm1341257376" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> <paragraph id="par_idm1341256144" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3153188" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340928496" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChDrive</paragraph> -<paragraph id="par_id3152576" role="bascode" xml-lang="en-US"> ChDrive "D" ' Only possible if a drive 'D' exists.</paragraph> +<paragraph id="par_id3152576" role="bascode" xml-lang="en-US"> ChDrive "D" ' Only possible if a drive 'D' exists.</paragraph> <paragraph id="par_idm1340925472" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341570656" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCurDir</paragraph> <paragraph id="par_idm1341569424" role="bascode" localize="false" xml-lang="en-US">Dim sDir1 As String , sDir2 As String</paragraph> -<paragraph id="par_idm1341568176" role="bascode" localize="false" xml-lang="en-US"> sDir1 = "c:\Test"</paragraph> -<paragraph id="par_idm1341566944" role="bascode" localize="false" xml-lang="en-US"> sDir2 = "d:\Private"</paragraph> -<paragraph id="par_idm1341565696" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir1 )</paragraph> -<paragraph id="par_idm1341564464" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> -<paragraph id="par_idm1341563232" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir2 )</paragraph> -<paragraph id="par_idm1341562000" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> +<paragraph id="par_idm1341568176" role="bascode" localize="false" xml-lang="en-US"> sDir1 = "c:\Test"</paragraph> +<paragraph id="par_idm1341566944" role="bascode" localize="false" xml-lang="en-US"> sDir2 = "d:\Private"</paragraph> +<paragraph id="par_idm1341565696" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir1 )</paragraph> +<paragraph id="par_idm1341564464" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> +<paragraph id="par_idm1341563232" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir2 )</paragraph> +<paragraph id="par_idm1341562000" role="bascode" localize="false" xml-lang="en-US"> MsgBox CurDir</paragraph> <paragraph id="par_idm1341560768" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_id3148455" role="bascode" xml-lang="en-US">' Displays all files and directories</paragraph> <paragraph id="par_idm1341559232" role="bascode" localize="false" xml-lang="en-US">Dim sPath As String</paragraph> <paragraph id="par_idm1341558000" role="bascode" localize="false" xml-lang="en-US">Dim sDir As String, sValue As String</paragraph> -<paragraph id="par_id3153416" role="bascode" xml-lang="en-US"> sDir="Directories:"</paragraph> -<paragraph id="par_idm1341555040" role="bascode" localize="false" xml-lang="en-US"> sPath = CurDir</paragraph> -<paragraph id="par_idm1341553808" role="bascode" localize="false" xml-lang="en-US"> sValue = Dir$(sPath + getPathSeparator + "*",16)</paragraph> -<paragraph id="par_idm1341552544" role="bascode" localize="false" xml-lang="en-US"> Do</paragraph> -<paragraph id="par_idm1341551312" role="bascode" localize="false" xml-lang="en-US"> If sValue <> "." And sValue <> ".." Then</paragraph> -<paragraph id="par_idm1341550000" role="bascode" localize="false" xml-lang="en-US"> If (GetAttr( sPath + getPathSeparator + sValue) And 16) >0 Then</paragraph> -<paragraph id="par_id3154253" role="bascode" xml-lang="en-US"> ' Get the directories</paragraph> -<paragraph id="par_idm1341546912" role="bascode" localize="false" xml-lang="en-US"> sDir = sDir & chr(13) & sValue</paragraph> -<paragraph id="par_idm1341545632" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341544400" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341543168" role="bascode" localize="false" xml-lang="en-US"> sValue = Dir$</paragraph> -<paragraph id="par_idm1341541936" role="bascode" localize="false" xml-lang="en-US"> Loop Until sValue = ""</paragraph> -<paragraph id="par_idm1341540688" role="bascode" localize="false" xml-lang="en-US"> MsgBox sDir,0,sPath</paragraph> +<paragraph id="par_id3153416" role="bascode" xml-lang="en-US"> sDir="Directories:"</paragraph> +<paragraph id="par_idm1341555040" role="bascode" localize="false" xml-lang="en-US"> sPath = CurDir</paragraph> +<paragraph id="par_idm1341553808" role="bascode" localize="false" xml-lang="en-US"> sValue = Dir$(sPath + getPathSeparator + "*",16)</paragraph> +<paragraph id="par_idm1341552544" role="bascode" localize="false" xml-lang="en-US"> Do</paragraph> +<paragraph id="par_idm1341551312" role="bascode" localize="false" xml-lang="en-US"> If sValue <> "." And sValue <> ".." Then</paragraph> +<paragraph id="par_idm1341550000" role="bascode" localize="false" xml-lang="en-US"> If (GetAttr( sPath + getPathSeparator + sValue) And 16) >0 Then</paragraph> +<paragraph id="par_id3154253" role="bascode" xml-lang="en-US"> ' Get the directories</paragraph> +<paragraph id="par_idm1341546912" role="bascode" localize="false" xml-lang="en-US"> sDir = sDir & chr(13) & sValue</paragraph> +<paragraph id="par_idm1341545632" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341544400" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341543168" role="bascode" localize="false" xml-lang="en-US"> sValue = Dir$</paragraph> +<paragraph id="par_idm1341541936" role="bascode" localize="false" xml-lang="en-US"> Loop Until sValue = ""</paragraph> +<paragraph id="par_idm1341540688" role="bascode" localize="false" xml-lang="en-US"> MsgBox sDir,0,sPath</paragraph> <paragraph id="par_idm1341539456" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341148272" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph> <paragraph id="par_idm1341147040" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1341145808" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> -<paragraph id="par_idm1341144576" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341143328" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341142096" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3155607" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> -<paragraph id="par_id3150361" role="bascode" xml-lang="en-US"> MsgBox FileAttr(#iNumber, 1 ),0,"Access mode"</paragraph> -<paragraph id="par_id3149817" role="bascode" xml-lang="en-US"> MsgBox FileAttr(#iNumber, 2 ),0,"File attribute"</paragraph> -<paragraph id="par_idm1341135568" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341144576" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341143328" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341142096" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3155607" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> +<paragraph id="par_id3150361" role="bascode" xml-lang="en-US"> MsgBox FileAttr(#iNumber, 1 ),0,"Access mode"</paragraph> +<paragraph id="par_id3149817" role="bascode" xml-lang="en-US"> MsgBox FileAttr(#iNumber, 2 ),0,"File attribute"</paragraph> +<paragraph id="par_idm1341135568" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> <paragraph id="par_idm1341134336" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3125863" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340767600" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFileCopy</paragraph> -<paragraph id="par_idm1340766368" role="bascode" localize="false" xml-lang="en-US"> FileCopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"</paragraph> +<paragraph id="par_idm1340766368" role="bascode" localize="false" xml-lang="en-US"> FileCopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"</paragraph> <paragraph id="par_idm1340765104" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3146119" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340766944" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFileDateTime</paragraph> -<paragraph id="par_idm1340765712" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileDateTime("C:\autoexec.bat")</paragraph> +<paragraph id="par_idm1340765712" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileDateTime("C:\autoexec.bat")</paragraph> <paragraph id="par_idm1340764448" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3163710" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341573440" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFileLen</paragraph> -<paragraph id="par_idm1341572208" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileLen("C:\autoexec.bat")</paragraph> +<paragraph id="par_idm1341572208" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileLen("C:\autoexec.bat")</paragraph> <paragraph id="par_idm1341570960" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341566848" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSetGetAttr</paragraph> <paragraph id="par_id3155415" role="bascode" xml-lang="en-US">On Error GoTo ErrorHandler ' Define target for error handler</paragraph> -<paragraph id="par_idm1341563936" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test",16)="" Then MkDir "C:\test"</paragraph> -<paragraph id="par_idm1341562672" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> -<paragraph id="par_idm1341561360" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,0</paragraph> -<paragraph id="par_idm1341560096" role="bascode" localize="false" xml-lang="en-US"> FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> -<paragraph id="par_idm1341558816" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,1</paragraph> -<paragraph id="par_idm1341557552" role="bascode" localize="false" xml-lang="en-US"> Print GetAttr( "c:\test\autoexec.sav" )</paragraph> -<paragraph id="par_idm1341556288" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> +<paragraph id="par_idm1341563936" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test",16)="" Then MkDir "C:\test"</paragraph> +<paragraph id="par_idm1341562672" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> +<paragraph id="par_idm1341561360" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,0</paragraph> +<paragraph id="par_idm1341560096" role="bascode" localize="false" xml-lang="en-US"> FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> +<paragraph id="par_idm1341558816" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,1</paragraph> +<paragraph id="par_idm1341557552" role="bascode" localize="false" xml-lang="en-US"> Print GetAttr( "c:\test\autoexec.sav" )</paragraph> +<paragraph id="par_idm1341556288" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> <paragraph id="par_idm1341555056" role="bascode" localize="false" xml-lang="en-US">ErrorHandler:</paragraph> -<paragraph id="par_idm1341553824" role="bascode" localize="false" xml-lang="en-US"> Print Error</paragraph> -<paragraph id="par_idm1341552592" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> +<paragraph id="par_idm1341553824" role="bascode" localize="false" xml-lang="en-US"> Print Error</paragraph> +<paragraph id="par_idm1341552592" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> <paragraph id="par_idm1341551360" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3148645" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm871806352" role="bascode" localize="false" xml-lang="en-US">Sub ExampleKill</paragraph> -<paragraph id="par_id3163710" role="bascode" xml-lang="en-US"> Kill "C:\datafile.dat" ' File must be created in advance</paragraph> +<paragraph id="par_id3163710" role="bascode" xml-lang="en-US"> Kill "C:\datafile.dat" ' File must be created in advance</paragraph> <paragraph id="par_idm871803312" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_id3148663" role="bascode" xml-lang="en-US">Const sFile2 As String = "Copied.tmp"</paragraph> <paragraph id="par_id3154071" role="bascode" xml-lang="en-US">Const sFile3 As String = "Renamed.tmp"</paragraph> <paragraph id="par_idm1341374400" role="bascode" localize="false" xml-lang="en-US">Dim sFile As String</paragraph> -<paragraph id="par_idm1341373168" role="bascode" localize="false" xml-lang="en-US"> sFile = sDir1 + "/" + sSubDir1</paragraph> -<paragraph id="par_idm1341371920" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir1 )</paragraph> -<paragraph id="par_id3154217" role="bascode" xml-lang="en-US"> If Dir(sSubDir1,16)="" Then ' Does the directory exist?</paragraph> -<paragraph id="par_idm1341368880" role="bascode" localize="false" xml-lang="en-US"> MkDir sSubDir1</paragraph> -<paragraph id="par_id3147228" role="bascode" xml-lang="en-US"> MsgBox sFile,0,"Create directory"</paragraph> -<paragraph id="par_idm1341365904" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341364672" role="bascode" localize="false" xml-lang="en-US"> sFile = sFile + "/" + sFile2</paragraph> -<paragraph id="par_idm1341363424" role="bascode" localize="false" xml-lang="en-US"> FileCopy sFile1 , sFile</paragraph> -<paragraph id="par_id3153770" role="bascode" xml-lang="en-US"> MsgBox fSysURL(CurDir()),0,"Current directory"</paragraph> -<paragraph id="par_id3159154" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13) & FileDateTime( sFile ),0,"Creation time"</paragraph> -<paragraph id="par_id3149484" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13)& FileLen( sFile ),0,"File length"</paragraph> -<paragraph id="par_id3152885" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13)& GetAttr( sFile ),0,"File attributes"</paragraph> -<paragraph id="par_idm1341354896" role="bascode" localize="false" xml-lang="en-US"> Name sFile As sDir1 + "/" + sSubDir1 + "/" + sFile3</paragraph> -<paragraph id="par_id3153952" role="bascode" xml-lang="en-US"> ' Rename in the same directory</paragraph> -<paragraph id="par_idm1341351856" role="bascode" localize="false" xml-lang="en-US"> sFile = sDir1 + "/" + sSubDir1 + "/" + sFile3</paragraph> -<paragraph id="par_id3147426" role="bascode" xml-lang="en-US"> SetAttr( sFile, 0 ) 'Delete all attributes</paragraph> -<paragraph id="par_id3148647" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13) & GetAttr( sFile ),0,"New file attributes"</paragraph> -<paragraph id="par_idm1341346992" role="bascode" localize="false" xml-lang="en-US"> Kill sFile</paragraph> -<paragraph id="par_idm1341345760" role="bascode" localize="false" xml-lang="en-US"> RmDir sDir1 + "/" + sSubDir1</paragraph> +<paragraph id="par_idm1341373168" role="bascode" localize="false" xml-lang="en-US"> sFile = sDir1 + "/" + sSubDir1</paragraph> +<paragraph id="par_idm1341371920" role="bascode" localize="false" xml-lang="en-US"> ChDir( sDir1 )</paragraph> +<paragraph id="par_id3154217" role="bascode" xml-lang="en-US"> If Dir(sSubDir1,16)="" Then ' Does the directory exist?</paragraph> +<paragraph id="par_idm1341368880" role="bascode" localize="false" xml-lang="en-US"> MkDir sSubDir1</paragraph> +<paragraph id="par_id3147228" role="bascode" xml-lang="en-US"> MsgBox sFile,0,"Create directory"</paragraph> +<paragraph id="par_idm1341365904" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341364672" role="bascode" localize="false" xml-lang="en-US"> sFile = sFile + "/" + sFile2</paragraph> +<paragraph id="par_idm1341363424" role="bascode" localize="false" xml-lang="en-US"> FileCopy sFile1 , sFile</paragraph> +<paragraph id="par_id3153770" role="bascode" xml-lang="en-US"> MsgBox fSysURL(CurDir()),0,"Current directory"</paragraph> +<paragraph id="par_id3159154" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13) & FileDateTime( sFile ),0,"Creation time"</paragraph> +<paragraph id="par_id3149484" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13)& FileLen( sFile ),0,"File length"</paragraph> +<paragraph id="par_id3152885" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13)& GetAttr( sFile ),0,"File attributes"</paragraph> +<paragraph id="par_idm1341354896" role="bascode" localize="false" xml-lang="en-US"> Name sFile As sDir1 + "/" + sSubDir1 + "/" + sFile3</paragraph> +<paragraph id="par_id3153952" role="bascode" xml-lang="en-US"> ' Rename in the same directory</paragraph> +<paragraph id="par_idm1341351856" role="bascode" localize="false" xml-lang="en-US"> sFile = sDir1 + "/" + sSubDir1 + "/" + sFile3</paragraph> +<paragraph id="par_id3147426" role="bascode" xml-lang="en-US"> SetAttr( sFile, 0 ) 'Delete all attributes</paragraph> +<paragraph id="par_id3148647" role="bascode" xml-lang="en-US"> MsgBox sFile & Chr(13) & GetAttr( sFile ),0,"New file attributes"</paragraph> +<paragraph id="par_idm1341346992" role="bascode" localize="false" xml-lang="en-US"> Kill sFile</paragraph> +<paragraph id="par_idm1341345760" role="bascode" localize="false" xml-lang="en-US"> RmDir sDir1 + "/" + sSubDir1</paragraph> <paragraph id="par_idm1341344512" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_id3153157" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_id3150092" role="bascode" xml-lang="en-US">' Converts a system path in URL</paragraph> <paragraph id="par_idm1341100304" role="bascode" localize="false" xml-lang="en-US">Function fSysURL( fSysFp As String ) As String</paragraph> <paragraph id="par_idm1341099040" role="bascode" localize="false" xml-lang="en-US">Dim iPos As String</paragraph> -<paragraph id="par_idm1341097808" role="bascode" localize="false" xml-lang="en-US"> iPos = 1</paragraph> -<paragraph id="par_idm1341096576" role="bascode" localize="false" xml-lang="en-US"> iPos = Instr(iPos,fSysFp, getPathSeparator())</paragraph> -<paragraph id="par_idm1341095312" role="bascode" localize="false" xml-lang="en-US"> Do While iPos > 0</paragraph> -<paragraph id="par_idm1341093984" role="bascode" localize="false" xml-lang="en-US"> Mid( fSysFp, iPos , 1,"/")</paragraph> -<paragraph id="par_idm1341092768" role="bascode" localize="false" xml-lang="en-US"> iPos = Instr(iPos+1,fSysFp, getPathSeparator())</paragraph> -<paragraph id="par_idm1341091504" role="bascode" localize="false" xml-lang="en-US"> Loop</paragraph> -<paragraph id="par_id3156276" role="bascode" xml-lang="en-US"> ' the colon with DOS</paragraph> -<paragraph id="par_idm1341088544" role="bascode" localize="false" xml-lang="en-US"> iPos = Instr(1,fSysFp,":")</paragraph> -<paragraph id="par_idm1341087296" role="bascode" localize="false" xml-lang="en-US"> If iPos > 0 Then Mid( fSysFp, iPos , 1,"|")</paragraph> -<paragraph id="par_idm1341085952" role="bascode" localize="false" xml-lang="en-US"> fSysURL = "file://" & fSysFp</paragraph> +<paragraph id="par_idm1341097808" role="bascode" localize="false" xml-lang="en-US"> iPos = 1</paragraph> +<paragraph id="par_idm1341096576" role="bascode" localize="false" xml-lang="en-US"> iPos = Instr(iPos,fSysFp, getPathSeparator())</paragraph> +<paragraph id="par_idm1341095312" role="bascode" localize="false" xml-lang="en-US"> Do While iPos > 0</paragraph> +<paragraph id="par_idm1341093984" role="bascode" localize="false" xml-lang="en-US"> Mid( fSysFp, iPos , 1,"/")</paragraph> +<paragraph id="par_idm1341092768" role="bascode" localize="false" xml-lang="en-US"> iPos = Instr(iPos+1,fSysFp, getPathSeparator())</paragraph> +<paragraph id="par_idm1341091504" role="bascode" localize="false" xml-lang="en-US"> Loop</paragraph> +<paragraph id="par_id3156276" role="bascode" xml-lang="en-US"> ' the colon with DOS</paragraph> +<paragraph id="par_idm1341088544" role="bascode" localize="false" xml-lang="en-US"> iPos = Instr(1,fSysFp,":")</paragraph> +<paragraph id="par_idm1341087296" role="bascode" localize="false" xml-lang="en-US"> If iPos > 0 Then Mid( fSysFp, iPos , 1,"|")</paragraph> +<paragraph id="par_idm1341085952" role="bascode" localize="false" xml-lang="en-US"> fSysURL = "file://" & fSysFp</paragraph> <paragraph id="par_idm1341084688" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341612400" role="bascode" localize="false" xml-lang="en-US">End</paragraph> <paragraph id="par_idm1341611200" role="bascode" localize="false" xml-lang="en-US">Error:</paragraph> <paragraph id="par_idm1341609968" role="bascode" localize="false" xml-lang="en-US">If err = 58 Then</paragraph> -<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> MsgBox "File already exists"</paragraph> +<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> MsgBox "File already exists"</paragraph> <paragraph id="par_idm1341607008" role="bascode" localize="false" xml-lang="en-US">End If</paragraph> <paragraph id="par_idm1341605776" role="bascode" localize="false" xml-lang="en-US">End</paragraph> <paragraph id="par_idm1341604576" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> 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 @@ <paragraph id="hd_id3145271" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341576272" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRmDir</paragraph> -<paragraph id="par_idm1341575040" role="bascode" localize="false" xml-lang="en-US"> MkDir "C:\Test2"</paragraph> -<paragraph id="par_idm1341573808" role="bascode" localize="false" xml-lang="en-US"> ChDir "C:\test2"</paragraph> -<paragraph id="par_idm1341572576" role="bascode" localize="false" xml-lang="en-US"> MsgBox Curdir</paragraph> -<paragraph id="par_idm1341571344" role="bascode" localize="false" xml-lang="en-US"> ChDir "\"</paragraph> -<paragraph id="par_idm1341570112" role="bascode" localize="false" xml-lang="en-US"> RmDir "C:\test2"</paragraph> +<paragraph id="par_idm1341575040" role="bascode" localize="false" xml-lang="en-US"> MkDir "C:\Test2"</paragraph> +<paragraph id="par_idm1341573808" role="bascode" localize="false" xml-lang="en-US"> ChDir "C:\test2"</paragraph> +<paragraph id="par_idm1341572576" role="bascode" localize="false" xml-lang="en-US"> MsgBox Curdir</paragraph> +<paragraph id="par_idm1341571344" role="bascode" localize="false" xml-lang="en-US"> ChDir "\"</paragraph> +<paragraph id="par_idm1341570112" role="bascode" localize="false" xml-lang="en-US"> RmDir "C:\test2"</paragraph> <paragraph id="par_idm1341568880" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147434" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340803584" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSetGetAttr</paragraph> -<paragraph id="par_id3148645" role="bascode" xml-lang="en-US"> On Error GoTo ErrorHandler ' Define target for error handler</paragraph> -<paragraph id="par_idm1340800592" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test",16)="" Then MkDir "C:\test"</paragraph> -<paragraph id="par_idm1340799328" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> -<paragraph id="par_idm1340798016" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,0</paragraph> -<paragraph id="par_idm1340796752" role="bascode" localize="false" xml-lang="en-US"> FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> -<paragraph id="par_idm1341620608" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,1</paragraph> -<paragraph id="par_idm1341619344" role="bascode" localize="false" xml-lang="en-US"> Print GetAttr( "c:\test\autoexec.sav" )</paragraph> -<paragraph id="par_idm1341618080" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> +<paragraph id="par_id3148645" role="bascode" xml-lang="en-US"> On Error GoTo ErrorHandler ' Define target for error handler</paragraph> +<paragraph id="par_idm1340800592" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test",16)="" Then MkDir "C:\test"</paragraph> +<paragraph id="par_idm1340799328" role="bascode" localize="false" xml-lang="en-US"> If Dir("C:\test\autoexec.sav")="" Then FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> +<paragraph id="par_idm1340798016" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,0</paragraph> +<paragraph id="par_idm1340796752" role="bascode" localize="false" xml-lang="en-US"> FileCopy "c:\autoexec.bat", "c:\test\autoexec.sav"</paragraph> +<paragraph id="par_idm1341620608" role="bascode" localize="false" xml-lang="en-US"> SetAttr "c:\test\autoexec.sav" ,1</paragraph> +<paragraph id="par_idm1341619344" role="bascode" localize="false" xml-lang="en-US"> Print GetAttr( "c:\test\autoexec.sav" )</paragraph> +<paragraph id="par_idm1341618080" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> <paragraph id="par_idm1341616848" role="bascode" localize="false" xml-lang="en-US">ErrorHandler:</paragraph> -<paragraph id="par_idm1341615616" role="bascode" localize="false" xml-lang="en-US"> Print Error</paragraph> -<paragraph id="par_idm1341614384" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> +<paragraph id="par_idm1341615616" role="bascode" localize="false" xml-lang="en-US"> Print Error</paragraph> +<paragraph id="par_idm1341614384" role="bascode" localize="false" xml-lang="en-US"> End</paragraph> <paragraph id="par_idm1341613152" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3149664" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341149552" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFileExists</paragraph> -<paragraph id="par_idm1341148320" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileExists("C:\autoexec.bat")</paragraph> -<paragraph id="par_idm1341147056" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileExists("file:///d|/bookmark.htm")</paragraph> -<paragraph id="par_idm1341145760" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileExists("file:///d|/Private")</paragraph> +<paragraph id="par_idm1341148320" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileExists("C:\autoexec.bat")</paragraph> +<paragraph id="par_idm1341147056" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileExists("file:///d|/bookmark.htm")</paragraph> +<paragraph id="par_idm1341145760" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileExists("file:///d|/Private")</paragraph> <paragraph id="par_idm1341144496" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341132912" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateToIso</paragraph> -<paragraph id="par_id3153126" role="bascode" xml-lang="en-US"> MsgBox "" & CDateToIso(Now) ,64,"ISO Date"</paragraph> +<paragraph id="par_id3153126" role="bascode" xml-lang="en-US"> MsgBox "" & CDateToIso(Now) ,64,"ISO Date"</paragraph> <paragraph id="par_idm1341129856" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idN106C7" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340825424" role="bascode" localize="false" xml-lang="en-US">Sub example_dateadd</paragraph> -<paragraph id="par_idm1340824192" role="bascode" localize="false" xml-lang="en-US"> MsgBox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")</paragraph> +<paragraph id="par_idm1340824192" role="bascode" localize="false" xml-lang="en-US"> MsgBox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")</paragraph> <paragraph id="par_idm1340822896" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341576768" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateToUnoDate</paragraph> -<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> aDatabaseRow.updateDate(3, CDateToUnoDate(Now))</paragraph> -<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> aDateControl.Date = CDateToUnoDate(Now)</paragraph> +<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> aDatabaseRow.updateDate(3, CDateToUnoDate(Now))</paragraph> +<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> aDateControl.Date = CDateToUnoDate(Now)</paragraph> <paragraph id="par_idm1341571968" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341052400" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateFromUnoDate</paragraph> -<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoDate(aDatabaseRow.getDate(3)))</paragraph> -<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoDate(aDateControl.Date))</paragraph> +<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoDate(aDatabaseRow.getDate(3)))</paragraph> +<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoDate(aDateControl.Date))</paragraph> <paragraph id="par_idm1341047600" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341576752" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateToUnoTime</paragraph> -<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> aDatabaseRow.updateTime(3, CDateToUnoTime(Now))</paragraph> -<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> aTimeControl.Time = CDateToUnoTime(Now)</paragraph> +<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> aDatabaseRow.updateTime(3, CDateToUnoTime(Now))</paragraph> +<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> aTimeControl.Time = CDateToUnoTime(Now)</paragraph> <paragraph id="par_idm1341571952" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340912560" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateFromUnoTime</paragraph> -<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoTime(aDatabaseRow.getTime(3)))</paragraph> -<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoTime(aTimeControl.Time))</paragraph> +<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoTime(aDatabaseRow.getTime(3)))</paragraph> +<paragraph id="par_id3153127" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoTime(aTimeControl.Time))</paragraph> <paragraph id="par_idm1340907760" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1206672048" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateToUnoDateTime</paragraph> -<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> aDatabaseRow.updateTimestamp(3, CDateToUnoDateTime(Now))</paragraph> +<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> aDatabaseRow.updateTimestamp(3, CDateToUnoDateTime(Now))</paragraph> <paragraph id="par_idm1206669312" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147243" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1073172720" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDateFromUnoDateTime</paragraph> -<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoDateTime(aDatabaseRow.getTimestamp(3)))</paragraph> +<paragraph id="par_id3153126" role="bascode" localize="false" xml-lang="en-US"> MsgBox(CDateFromUnoDateTime(aDatabaseRow.getTimestamp(3)))</paragraph> <paragraph id="par_idm1073169680" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idN10738" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341501344" role="bascode" localize="false" xml-lang="en-US">Sub example_datediff</paragraph> -<paragraph id="par_idm1341500112" role="bascode" localize="false" xml-lang="en-US"> MsgBox DateDiff("d", "1/1/2005", "12/31/2005")</paragraph> +<paragraph id="par_idm1341500112" role="bascode" localize="false" xml-lang="en-US"> MsgBox DateDiff("d", "1/1/2005", "12/31/2005")</paragraph> <paragraph id="par_idm1341498848" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idN10611" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341577504" role="bascode" localize="false" xml-lang="en-US">Sub example_datepart</paragraph> -<paragraph id="par_idm1341576272" role="bascode" localize="false" xml-lang="en-US"> MsgBox DatePart("ww", "12/31/2005")</paragraph> +<paragraph id="par_idm1341576272" role="bascode" localize="false" xml-lang="en-US"> MsgBox DatePart("ww", "12/31/2005")</paragraph> <paragraph id="par_idm1341575024" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147229" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341594784" role="bascode" localize="false" xml-lang="en-US">Sub ExampleNow</paragraph> -<paragraph id="par_id3150870" role="bascode" xml-lang="en-US"> MsgBox "It is now " & Now</paragraph> +<paragraph id="par_id3150870" role="bascode" xml-lang="en-US"> MsgBox "It is now " & Now</paragraph> <paragraph id="par_idm1341591760" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147426" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341619920" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSecond</paragraph> -<paragraph id="par_id3156441" role="bascode" xml-lang="en-US"> MsgBox "The exact second of the current time is "& Second( Now )</paragraph> +<paragraph id="par_id3156441" role="bascode" xml-lang="en-US"> MsgBox "The exact second of the current time is "& Second( Now )</paragraph> <paragraph id="par_idm1341616880" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341318224" role="bascode" localize="false" xml-lang="en-US">Sub ExampleTimeSerial</paragraph> <paragraph id="par_idm1341316992" role="bascode" localize="false" xml-lang="en-US">Dim dDate As Double, sDate As String</paragraph> -<paragraph id="par_idm1341315744" role="bascode" localize="false" xml-lang="en-US"> dDate = TimeSerial(8,30,15)</paragraph> -<paragraph id="par_idm1341314496" role="bascode" localize="false" xml-lang="en-US"> sDate = TimeSerial(8,30,15)</paragraph> -<paragraph id="par_id3155600" role="bascode" xml-lang="en-US"> MsgBox dDate,64,"Time as a number"</paragraph> -<paragraph id="par_id3153417" role="bascode" xml-lang="en-US"> MsgBox sDate,64,"Formatted time"</paragraph> +<paragraph id="par_idm1341315744" role="bascode" localize="false" xml-lang="en-US"> dDate = TimeSerial(8,30,15)</paragraph> +<paragraph id="par_idm1341314496" role="bascode" localize="false" xml-lang="en-US"> sDate = TimeSerial(8,30,15)</paragraph> +<paragraph id="par_id3155600" role="bascode" xml-lang="en-US"> MsgBox dDate,64,"Time as a number"</paragraph> +<paragraph id="par_id3153417" role="bascode" xml-lang="en-US"> MsgBox sDate,64,"Formatted time"</paragraph> <paragraph id="par_idm1341309792" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340872288" role="bascode" localize="false" xml-lang="en-US">Sub ExampleTimerValue</paragraph> <paragraph id="par_idm1340871056" role="bascode" localize="false" xml-lang="en-US">Dim daDT As Date</paragraph> <paragraph id="par_idm1340869824" role="bascode" localize="false" xml-lang="en-US">Dim a1, b1, c1, a2, b2, c2 As String</paragraph> -<paragraph id="par_id3149378" role="bascode" xml-lang="en-US"> a1 = "start time"</paragraph> -<paragraph id="par_id3145800" role="bascode" xml-lang="en-US"> b1 = "end time"</paragraph> -<paragraph id="par_id3151074" role="bascode" xml-lang="en-US"> c1 = "total time"</paragraph> -<paragraph id="par_idm1340863440" role="bascode" localize="false" xml-lang="en-US"> a2 = "8:34"</paragraph> -<paragraph id="par_idm1340862208" role="bascode" localize="false" xml-lang="en-US"> b2 = "18:12"</paragraph> -<paragraph id="par_idm1340860976" role="bascode" localize="false" xml-lang="en-US"> daDT = TimeValue(b2) - TimeValue(a2)</paragraph> -<paragraph id="par_idm1340859712" role="bascode" localize="false" xml-lang="en-US"> c2 = a1 & ": " & a2 & chr(13)</paragraph> -<paragraph id="par_idm1340858432" role="bascode" localize="false" xml-lang="en-US"> c2 = c2 & b1 & ": " & b2 & chr(13)</paragraph> -<paragraph id="par_idm1340857152" role="bascode" localize="false" xml-lang="en-US"> c2 = c2 & c1 & ": " & trim(Str(Hour(daDT))) & ":" & trim(Str(Minute(daDT))) & ":" & trim(Str(Second(daDT)))</paragraph> -<paragraph id="par_idm1340855680" role="bascode" localize="false" xml-lang="en-US"> MsgBox c2</paragraph> +<paragraph id="par_id3149378" role="bascode" xml-lang="en-US"> a1 = "start time"</paragraph> +<paragraph id="par_id3145800" role="bascode" xml-lang="en-US"> b1 = "end time"</paragraph> +<paragraph id="par_id3151074" role="bascode" xml-lang="en-US"> c1 = "total time"</paragraph> +<paragraph id="par_idm1340863440" role="bascode" localize="false" xml-lang="en-US"> a2 = "8:34"</paragraph> +<paragraph id="par_idm1340862208" role="bascode" localize="false" xml-lang="en-US"> b2 = "18:12"</paragraph> +<paragraph id="par_idm1340860976" role="bascode" localize="false" xml-lang="en-US"> daDT = TimeValue(b2) - TimeValue(a2)</paragraph> +<paragraph id="par_idm1340859712" role="bascode" localize="false" xml-lang="en-US"> c2 = a1 & ": " & a2 & chr(13)</paragraph> +<paragraph id="par_idm1340858432" role="bascode" localize="false" xml-lang="en-US"> c2 = c2 & b1 & ": " & b2 & chr(13)</paragraph> +<paragraph id="par_idm1340857152" role="bascode" localize="false" xml-lang="en-US"> c2 = c2 & c1 & ": " & trim(Str(Hour(daDT))) & ":" & trim(Str(Minute(daDT))) & ":" & trim(Str(Second(daDT)))</paragraph> +<paragraph id="par_idm1340855680" role="bascode" localize="false" xml-lang="en-US"> MsgBox c2</paragraph> <paragraph id="par_idm1340854448" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3150793" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341306160" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDate</paragraph> -<paragraph id="par_id3156424" role="bascode" xml-lang="en-US"> MsgBox "The date is " & Date</paragraph> +<paragraph id="par_id3156424" role="bascode" xml-lang="en-US"> MsgBox "The date is " & Date</paragraph> <paragraph id="par_idm1341303136" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3145173" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341324032" role="bascode" localize="false" xml-lang="en-US">Sub ExampleTime</paragraph> -<paragraph id="par_id3150870" role="bascode" xml-lang="en-US"> MsgBox Time,0,"The time is"</paragraph> +<paragraph id="par_id3150870" role="bascode" xml-lang="en-US"> MsgBox Time,0,"The time is"</paragraph> <paragraph id="par_idm1341321024" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341580128" role="bascode" localize="false" xml-lang="en-US">Sub ExampleTimer</paragraph> <paragraph id="par_idm1341578896" role="bascode" localize="false" xml-lang="en-US">Dim lSec As Long,lMin As Long,lHour As Long</paragraph> -<paragraph id="par_idm1341577632" role="bascode" localize="false" xml-lang="en-US"> lSec = Timer</paragraph> -<paragraph id="par_id3145748" role="bascode" xml-lang="en-US"> MsgBox lSec,0,"Seconds since midnight"</paragraph> -<paragraph id="par_idm1341574656" role="bascode" localize="false" xml-lang="en-US"> lMin = lSec / 60</paragraph> -<paragraph id="par_idm1341573424" role="bascode" localize="false" xml-lang="en-US"> lSec = lSec Mod 60</paragraph> -<paragraph id="par_idm1341572192" role="bascode" localize="false" xml-lang="en-US"> lHour = lMin / 60</paragraph> -<paragraph id="par_idm1341570960" role="bascode" localize="false" xml-lang="en-US"> lMin = lMin Mod 60</paragraph> -<paragraph id="par_id3156283" role="bascode" xml-lang="en-US"> MsgBox Right("00" & lHour , 2) & ":"& Right("00" & lMin , 2) & ":" & Right("00" & lSec , 2) ,0,"The time is"</paragraph> +<paragraph id="par_idm1341577632" role="bascode" localize="false" xml-lang="en-US"> lSec = Timer</paragraph> +<paragraph id="par_id3145748" role="bascode" xml-lang="en-US"> MsgBox lSec,0,"Seconds since midnight"</paragraph> +<paragraph id="par_idm1341574656" role="bascode" localize="false" xml-lang="en-US"> lMin = lSec / 60</paragraph> +<paragraph id="par_idm1341573424" role="bascode" localize="false" xml-lang="en-US"> lSec = lSec Mod 60</paragraph> +<paragraph id="par_idm1341572192" role="bascode" localize="false" xml-lang="en-US"> lHour = lMin / 60</paragraph> +<paragraph id="par_idm1341570960" role="bascode" localize="false" xml-lang="en-US"> lMin = lMin Mod 60</paragraph> +<paragraph id="par_id3156283" role="bascode" xml-lang="en-US"> MsgBox Right("00" & lHour , 2) & ":"& Right("00" & lMin , 2) & ":" & Right("00" & lSec , 2) ,0,"The time is"</paragraph> <paragraph id="par_idm1341567920" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340988000" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> <paragraph id="par_idm1340986768" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> <paragraph id="par_id3153188" role="bascode" xml-lang="en-US">' Error caused by non-existent file</paragraph> -<paragraph id="par_idm1340983808" role="bascode" localize="false" xml-lang="en-US"> iVar = Freefile</paragraph> -<paragraph id="par_idm1340982576" role="bascode" localize="false" xml-lang="en-US"> Open "\file9879.txt" For Input As #iVar</paragraph> -<paragraph id="par_idm1340981312" role="bascode" localize="false" xml-lang="en-US"> Line Input #iVar, sVar</paragraph> -<paragraph id="par_idm1340980064" role="bascode" localize="false" xml-lang="en-US"> Close #iVar</paragraph> -<paragraph id="par_idm1340978832" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> +<paragraph id="par_idm1340983808" role="bascode" localize="false" xml-lang="en-US"> iVar = Freefile</paragraph> +<paragraph id="par_idm1340982576" role="bascode" localize="false" xml-lang="en-US"> Open "\file9879.txt" For Input As #iVar</paragraph> +<paragraph id="par_idm1340981312" role="bascode" localize="false" xml-lang="en-US"> Line Input #iVar, sVar</paragraph> +<paragraph id="par_idm1340980064" role="bascode" localize="false" xml-lang="en-US"> Close #iVar</paragraph> +<paragraph id="par_idm1340978832" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> <paragraph id="par_idm1340977600" role="bascode" localize="false" xml-lang="en-US">ErrorHandler:</paragraph> -<paragraph id="par_id3155416" role="bascode" xml-lang="en-US"> MsgBox "Error " & err & ": " & Error$ + chr(13) + "In Line : " + Erl + chr(13) + Now , 16 ,"An error occurred"</paragraph> +<paragraph id="par_id3155416" role="bascode" xml-lang="en-US"> MsgBox "Error " & err & ": " & Error$ + chr(13) + "In Line : " + Erl + chr(13) + Now , 16 ,"An error occurred"</paragraph> <paragraph id="par_idm1340974432" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341124240" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer</paragraph> <paragraph id="par_idm1341123008" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph> <paragraph id="par_idm1341121776" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph> -<paragraph id="par_idm1341120544" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> -<paragraph id="par_idm1341119296" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341118064" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> -<paragraph id="par_id3153876" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> -<paragraph id="par_idm1341115072" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341113840" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> -<paragraph id="par_idm1341112608" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> -<paragraph id="par_idm1341111360" role="bascode" localize="false" xml-lang="en-US"> For iCount = 1 To 5</paragraph> -<paragraph id="par_idm1341110128" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> -<paragraph id="par_idm1341108880" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> -<paragraph id="par_idm1341107632" role="bascode" localize="false" xml-lang="en-US"> Rem</paragraph> -<paragraph id="par_idm1341106400" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1341105168" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_idm1341103936" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> -<paragraph id="par_idm1341102704" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> +<paragraph id="par_idm1341120544" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph> +<paragraph id="par_idm1341119296" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341118064" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph> +<paragraph id="par_id3153876" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph> +<paragraph id="par_idm1341115072" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341113840" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph> +<paragraph id="par_idm1341112608" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph> +<paragraph id="par_idm1341111360" role="bascode" localize="false" xml-lang="en-US"> For iCount = 1 To 5</paragraph> +<paragraph id="par_idm1341110128" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph> +<paragraph id="par_idm1341108880" role="bascode" localize="false" xml-lang="en-US"> If sLine <>"" Then</paragraph> +<paragraph id="par_idm1341107632" role="bascode" localize="false" xml-lang="en-US"> Rem</paragraph> +<paragraph id="par_idm1341106400" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341105168" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_idm1341103936" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph> +<paragraph id="par_idm1341102704" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> <paragraph id="par_idm1341101472" role="bascode" localize="false" xml-lang="en-US">ErrorHandler:</paragraph> -<paragraph id="par_idm1341100240" role="bascode" localize="false" xml-lang="en-US"> Reset</paragraph> -<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> MsgBox "All files will be closed",0,"Error"</paragraph> +<paragraph id="par_idm1341100240" role="bascode" localize="false" xml-lang="en-US"> Reset</paragraph> +<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> MsgBox "All files will be closed",0,"Error"</paragraph> <paragraph id="par_idm1341097264" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340824864" role="bascode" localize="false" xml-lang="en-US">Sub ExampleAnd</paragraph> <paragraph id="par_idm1340823632" role="bascode" localize="false" xml-lang="en-US">Dim A As Variant, B As Variant, C As Variant, D As Variant</paragraph> <paragraph id="par_idm1340822352" role="bascode" localize="false" xml-lang="en-US">Dim vVarOut As Variant</paragraph> -<paragraph id="par_idm1340821120" role="bascode" localize="false" xml-lang="en-US"> A = 10: B = 8: C = 6: D = Null</paragraph> -<paragraph id="par_id3146984" role="bascode" xml-lang="en-US"> vVarOut = A > B And B > C ' returns -1</paragraph> -<paragraph id="par_id3154014" role="bascode" xml-lang="en-US"> vVarOut = B > A And B > C ' returns 0</paragraph> -<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> vVarOut = A > B And B > D ' returns 0</paragraph> -<paragraph id="par_id3145751" role="bascode" xml-lang="en-US"> vVarOut = (B > D And B > A) ' returns 0</paragraph> -<paragraph id="par_id3147394" role="bascode" xml-lang="en-US"> vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments</paragraph> +<paragraph id="par_idm1340821120" role="bascode" localize="false" xml-lang="en-US"> A = 10: B = 8: C = 6: D = Null</paragraph> +<paragraph id="par_id3146984" role="bascode" xml-lang="en-US"> vVarOut = A > B And B > C ' returns -1</paragraph> +<paragraph id="par_id3154014" role="bascode" xml-lang="en-US"> vVarOut = B > A And B > C ' returns 0</paragraph> +<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> vVarOut = A > B And B > D ' returns 0</paragraph> +<paragraph id="par_id3145751" role="bascode" xml-lang="en-US"> vVarOut = (B > D And B > A) ' returns 0</paragraph> +<paragraph id="par_id3147394" role="bascode" xml-lang="en-US"> vVarOut = B And A ' returns 8 due to the bitwise And combination of both arguments</paragraph> <paragraph id="par_idm1340810864" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341574288" role="bascode" localize="false" xml-lang="en-US">Sub ExampleEqv</paragraph> <paragraph id="par_idm1341573056" role="bascode" localize="false" xml-lang="en-US">Dim A As Variant, B As Variant, C As Variant, D As Variant<comment>see #i38265</comment></paragraph> <paragraph id="par_idm1341571488" role="bascode" localize="false" xml-lang="en-US">Dim vOut As Variant</paragraph> -<paragraph id="par_idm1341570256" role="bascode" localize="false" xml-lang="en-US"> A = 10: B = 8: C = 6: D = Null</paragraph> -<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> vOut = A > B Eqv B > C ' returns -1</paragraph> -<paragraph id="par_id3153191" role="bascode" xml-lang="en-US"> vOut = B > A Eqv B > C ' returns 0</paragraph> -<paragraph id="par_id3145799" role="bascode" xml-lang="en-US"> vOut = A > B Eqv B > D ' returns 0</paragraph> -<paragraph id="par_id3149412" role="bascode" xml-lang="en-US"> vOut = (B > D Eqv B > A) ' returns -1</paragraph> -<paragraph id="par_id3149959" role="bascode" xml-lang="en-US"> vOut = B Eqv A ' returns -3</paragraph> +<paragraph id="par_idm1341570256" role="bascode" localize="false" xml-lang="en-US"> A = 10: B = 8: C = 6: D = Null</paragraph> +<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> vOut = A > B Eqv B > C ' returns -1</paragraph> +<paragraph id="par_id3153191" role="bascode" xml-lang="en-US"> vOut = B > A Eqv B > C ' returns 0</paragraph> +<paragraph id="par_id3145799" role="bascode" xml-lang="en-US"> vOut = A > B Eqv B > D ' returns 0</paragraph> +<paragraph id="par_id3149412" role="bascode" xml-lang="en-US"> vOut = (B > D Eqv B > A) ' returns -1</paragraph> +<paragraph id="par_id3149959" role="bascode" xml-lang="en-US"> vOut = B Eqv A ' returns -3</paragraph> <paragraph id="par_idm1341560048" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341575552" role="bascode" localize="false" xml-lang="en-US">Sub ExampleImp</paragraph> <paragraph id="par_idm1341574320" role="bascode" localize="false" xml-lang="en-US">Dim A As Variant, B As Variant, C As Variant, D As Variant</paragraph> <paragraph id="par_idm1341573040" role="bascode" localize="false" xml-lang="en-US">Dim vOut As Variant</paragraph> -<paragraph id="par_idm1341571808" role="bascode" localize="false" xml-lang="en-US"> A = 10: B = 8: C = 6: D = Null</paragraph> -<paragraph id="par_id3145750" role="bascode" xml-lang="en-US"> vOut = A > B Imp B > C ' returns -1</paragraph> -<paragraph id="par_id3156441" role="bascode" xml-lang="en-US"> vOut = B > A Imp B > C ' returns -1</paragraph> -<paragraph id="par_id3152596" role="bascode" xml-lang="en-US"> vOut = A > B Imp B > D ' returns 0</paragraph> -<paragraph id="par_id3154942" role="bascode" xml-lang="en-US"> vOut = (B > D Imp B > A) ' returns -1</paragraph> -<paragraph id="par_id3154492" role="bascode" xml-lang="en-US"> vOut = B Imp A ' returns -1</paragraph> +<paragraph id="par_idm1341571808" role="bascode" localize="false" xml-lang="en-US"> A = 10: B = 8: C = 6: D = Null</paragraph> +<paragraph id="par_id3145750" role="bascode" xml-lang="en-US"> vOut = A > B Imp B > C ' returns -1</paragraph> +<paragraph id="par_id3156441" role="bascode" xml-lang="en-US"> vOut = B > A Imp B > C ' returns -1</paragraph> +<paragraph id="par_id3152596" role="bascode" xml-lang="en-US"> vOut = A > B Imp B > D ' returns 0</paragraph> +<paragraph id="par_id3154942" role="bascode" xml-lang="en-US"> vOut = (B > D Imp B > A) ' returns -1</paragraph> +<paragraph id="par_id3154492" role="bascode" xml-lang="en-US"> vOut = B Imp A ' returns -1</paragraph> <paragraph id="par_idm1341561584" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341144144" role="bascode" localize="false" xml-lang="en-US">Sub ExampleNot</paragraph> <paragraph id="par_idm1341142912" role="bascode" localize="false" xml-lang="en-US">Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant</paragraph> <paragraph id="par_idm1341141632" role="bascode" localize="false" xml-lang="en-US">Dim vOut As Variant</paragraph> -<paragraph id="par_idm1341140400" role="bascode" localize="false" xml-lang="en-US"> vA = 10: vB = 8: vC = 6: vD = Null</paragraph> -<paragraph id="par_id3145749" role="bascode" xml-lang="en-US"> vOut = Not vA ' Returns -11</paragraph> -<paragraph id="par_id3148645" role="bascode" xml-lang="en-US"> vOut = Not(vC > vD) ' Returns -1</paragraph> -<paragraph id="par_id3156441" role="bascode" xml-lang="en-US"> vOut = Not(vB > vA) ' Returns -1</paragraph> -<paragraph id="par_id3152596" role="bascode" xml-lang="en-US"> vOut = Not(vA > vB) ' Returns 0</paragraph> +<paragraph id="par_idm1341140400" role="bascode" localize="false" xml-lang="en-US"> vA = 10: vB = 8: vC = 6: vD = Null</paragraph> +<paragraph id="par_id3145749" role="bascode" xml-lang="en-US"> vOut = Not vA ' Returns -11</paragraph> +<paragraph id="par_id3148645" role="bascode" xml-lang="en-US"> vOut = Not(vC > vD) ' Returns -1</paragraph> +<paragraph id="par_id3156441" role="bascode" xml-lang="en-US"> vOut = Not(vB > vA) ' Returns -1</paragraph> +<paragraph id="par_id3152596" role="bascode" xml-lang="en-US"> vOut = Not(vA > vB) ' Returns 0</paragraph> <paragraph id="par_idm1341132192" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340848352" role="bascode" localize="false" xml-lang="en-US">Sub ExampleOr</paragraph> <paragraph id="par_idm1340847120" role="bascode" localize="false" xml-lang="en-US">Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant</paragraph> <paragraph id="par_idm1340845840" role="bascode" localize="false" xml-lang="en-US">Dim vOut As Variant</paragraph> -<paragraph id="par_idm1340844608" role="bascode" localize="false" xml-lang="en-US"> vA = 10: vB = 8: vC = 6: vD = Null</paragraph> -<paragraph id="par_idm1340843360" role="bascode" localize="false" xml-lang="en-US"> vOut = vA > vB Or vB > vC ' -1</paragraph> -<paragraph id="par_idm1340842064" role="bascode" localize="false" xml-lang="en-US"> vOut = vB > vA Or vB > vC ' -1</paragraph> -<paragraph id="par_idm1340840768" role="bascode" localize="false" xml-lang="en-US"> vOut = vA > vB Or vB > vD ' -1</paragraph> -<paragraph id="par_idm1340839472" role="bascode" localize="false" xml-lang="en-US"> vOut = (vB > vD Or vB > vA) ' 0</paragraph> -<paragraph id="par_idm1340838176" role="bascode" localize="false" xml-lang="en-US"> vOut = vB Or vA ' 10</paragraph> +<paragraph id="par_idm1340844608" role="bascode" localize="false" xml-lang="en-US"> vA = 10: vB = 8: vC = 6: vD = Null</paragraph> +<paragraph id="par_idm1340843360" role="bascode" localize="false" xml-lang="en-US"> vOut = vA > vB Or vB > vC ' -1</paragraph> +<paragraph id="par_idm1340842064" role="bascode" localize="false" xml-lang="en-US"> vOut = vB > vA Or vB > vC ' -1</paragraph> +<paragraph id="par_idm1340840768" role="bascode" localize="false" xml-lang="en-US"> vOut = vA > vB Or vB > vD ' -1</paragraph> +<paragraph id="par_idm1340839472" role="bascode" localize="false" xml-lang="en-US"> vOut = (vB > vD Or vB > vA) ' 0</paragraph> +<paragraph id="par_idm1340838176" role="bascode" localize="false" xml-lang="en-US"> vOut = vB Or vA ' 10</paragraph> <paragraph id="par_idm1340836928" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341575648" role="bascode" localize="false" xml-lang="en-US">Sub ExampleXor</paragraph> <paragraph id="par_idm1341574416" role="bascode" localize="false" xml-lang="en-US">Dim vA As Variant, vB As Variant, vC As Variant, vD As Variant</paragraph> <paragraph id="par_idm1341573136" role="bascode" localize="false" xml-lang="en-US">Dim vOut As Variant</paragraph> -<paragraph id="par_idm1341571904" role="bascode" localize="false" xml-lang="en-US"> vA = 10: vB = 8: vC = 6: vD = Null</paragraph> -<paragraph id="par_id3156442" role="bascode" xml-lang="en-US"> vOut = vA > vB Xor vB > vC ' returns 0</paragraph> -<paragraph id="par_id3153191" role="bascode" xml-lang="en-US"> vOut = vB > vA Xor vB > vC ' returns -1</paragraph> -<paragraph id="par_id3153144" role="bascode" xml-lang="en-US"> vOut = vA > vB Xor vB > vD ' returns -1</paragraph> -<paragraph id="par_id3154944" role="bascode" xml-lang="en-US"> vOut = (vB > vD Xor vB > vA) ' returns 0</paragraph> -<paragraph id="par_id3148455" role="bascode" xml-lang="en-US"> vOut = vB Xor vA ' returns 2</paragraph> +<paragraph id="par_idm1341571904" role="bascode" localize="false" xml-lang="en-US"> vA = 10: vB = 8: vC = 6: vD = Null</paragraph> +<paragraph id="par_id3156442" role="bascode" xml-lang="en-US"> vOut = vA > vB Xor vB > vC ' returns 0</paragraph> +<paragraph id="par_id3153191" role="bascode" xml-lang="en-US"> vOut = vB > vA Xor vB > vC ' returns -1</paragraph> +<paragraph id="par_id3153144" role="bascode" xml-lang="en-US"> vOut = vA > vB Xor vB > vD ' returns -1</paragraph> +<paragraph id="par_id3154944" role="bascode" xml-lang="en-US"> vOut = (vB > vD Xor vB > vA) ' returns 0</paragraph> +<paragraph id="par_id3148455" role="bascode" xml-lang="en-US"> vOut = vB Xor vA ' returns 2</paragraph> <paragraph id="par_idm1341561664" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3154366" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341579664" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSubtraction1</paragraph> -<paragraph id="par_idm1341578432" role="bascode" localize="false" xml-lang="en-US"> Print 5 - 5</paragraph> +<paragraph id="par_idm1341578432" role="bascode" localize="false" xml-lang="en-US"> Print 5 - 5</paragraph> <paragraph id="par_idm1341577200" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341575968" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341574720" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSubtraction2</paragraph> <paragraph id="par_idm1341573488" role="bascode" localize="false" xml-lang="en-US">Dim iValue1 As Integer</paragraph> <paragraph id="par_idm1341572256" role="bascode" localize="false" xml-lang="en-US">Dim iValue2 As Integer</paragraph> -<paragraph id="par_idm1341571024" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> -<paragraph id="par_idm1341569792" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> -<paragraph id="par_idm1341568560" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 - iValue2</paragraph> +<paragraph id="par_idm1341571024" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> +<paragraph id="par_idm1341569792" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> +<paragraph id="par_idm1341568560" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 - iValue2</paragraph> <paragraph id="par_idm1341567312" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3153968" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341058256" role="bascode" localize="false" xml-lang="en-US">Sub ExampleMultiplication1</paragraph> -<paragraph id="par_idm1341621360" role="bascode" localize="false" xml-lang="en-US"> Print 5 * 5</paragraph> +<paragraph id="par_idm1341621360" role="bascode" localize="false" xml-lang="en-US"> Print 5 * 5</paragraph> <paragraph id="par_idm1341620128" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341618896" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341617696" role="bascode" localize="false" xml-lang="en-US">Sub ExampleMultiplication2</paragraph> <paragraph id="par_idm1341616448" role="bascode" localize="false" xml-lang="en-US">Dim iValue1 As Integer</paragraph> <paragraph id="par_idm1341615216" role="bascode" localize="false" xml-lang="en-US">Dim iValue2 As Integer</paragraph> -<paragraph id="par_idm1341613984" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> -<paragraph id="par_idm1341612752" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> -<paragraph id="par_idm1341611520" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 * iValue2</paragraph> +<paragraph id="par_idm1341613984" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> +<paragraph id="par_idm1341612752" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> +<paragraph id="par_idm1341611520" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 * iValue2</paragraph> <paragraph id="par_idm1341610272" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3153969" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340484848" role="bascode" localize="false" xml-lang="en-US">Sub ExampleAddition1</paragraph> -<paragraph id="par_idm1340483616" role="bascode" localize="false" xml-lang="en-US"> Print 5 + 5</paragraph> +<paragraph id="par_idm1340483616" role="bascode" localize="false" xml-lang="en-US"> Print 5 + 5</paragraph> <paragraph id="par_idm1340482384" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340481152" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340479904" role="bascode" localize="false" xml-lang="en-US">Sub ExampleAddition2</paragraph> <paragraph id="par_idm1340478672" role="bascode" localize="false" xml-lang="en-US">Dim iValue1 As Integer</paragraph> <paragraph id="par_idm1340477440" role="bascode" localize="false" xml-lang="en-US">Dim iValue2 As Integer</paragraph> -<paragraph id="par_idm1340476208" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> -<paragraph id="par_idm1340474976" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> -<paragraph id="par_idm1340473744" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 + iValue2</paragraph> +<paragraph id="par_idm1340476208" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> +<paragraph id="par_idm1340474976" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> +<paragraph id="par_idm1340473744" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 + iValue2</paragraph> <paragraph id="par_idm1340472496" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3154684" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341473008" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDivision1</paragraph> -<paragraph id="par_idm1341471776" role="bascode" localize="false" xml-lang="en-US"> Print 5 / 5</paragraph> +<paragraph id="par_idm1341471776" role="bascode" localize="false" xml-lang="en-US"> Print 5 / 5</paragraph> <paragraph id="par_idm1341470544" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341469312" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341468064" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDivision2</paragraph> <paragraph id="par_idm1341466832" role="bascode" localize="false" xml-lang="en-US">Dim iValue1 As Integer</paragraph> <paragraph id="par_idm1341465600" role="bascode" localize="false" xml-lang="en-US">Dim iValue2 As Integer</paragraph> -<paragraph id="par_idm1341464368" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> -<paragraph id="par_idm1341463136" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> -<paragraph id="par_idm1341461904" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 / iValue2</paragraph> +<paragraph id="par_idm1341464368" role="bascode" localize="false" xml-lang="en-US"> iValue1 = 5</paragraph> +<paragraph id="par_idm1341463136" role="bascode" localize="false" xml-lang="en-US"> iValue2 = 10</paragraph> +<paragraph id="par_idm1341461904" role="bascode" localize="false" xml-lang="en-US"> Print iValue1 / iValue2</paragraph> <paragraph id="par_idm1341460656" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147287" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340559440" role="bascode" localize="false" xml-lang="en-US">Sub Example</paragraph> -<paragraph id="par_idm1340558208" role="bascode" localize="false" xml-lang="en-US"> Print ( 12.345 ^ 23 )</paragraph> -<paragraph id="par_id3146984" role="bascode" xml-lang="en-US"> Print Exp ( 23 * Log( 12.345 ) ) ' Raises by forming a logarithm</paragraph> +<paragraph id="par_idm1340558208" role="bascode" localize="false" xml-lang="en-US"> Print ( 12.345 ^ 23 )</paragraph> +<paragraph id="par_id3146984" role="bascode" xml-lang="en-US"> Print Exp ( 23 * Log( 12.345 ) ) ' Raises by forming a logarithm</paragraph> <paragraph id="par_idm1340555200" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3147287" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340853360" role="bascode" localize="false" xml-lang="en-US">Sub ExampleMod</paragraph> -<paragraph id="par_id3161832" role="bascode" xml-lang="en-US"> Print 10 Mod 2.5 ' returns 0</paragraph> -<paragraph id="par_id3146922" role="bascode" xml-lang="en-US"> Print 10 / 2.5 ' returns 4</paragraph> -<paragraph id="par_id3145273" role="bascode" xml-lang="en-US"> Print 10 Mod 5 ' returns 0</paragraph> -<paragraph id="par_id3150011" role="bascode" xml-lang="en-US"> Print 10 / 5 ' returns 2</paragraph> -<paragraph id="par_id3149483" role="bascode" xml-lang="en-US"> Print 5 Mod 10 ' returns 5</paragraph> -<paragraph id="par_id3151114" role="bascode" xml-lang="en-US"> Print 5 / 10 ' returns 0.5</paragraph> +<paragraph id="par_id3161832" role="bascode" xml-lang="en-US"> Print 10 Mod 2.5 ' returns 0</paragraph> +<paragraph id="par_id3146922" role="bascode" xml-lang="en-US"> Print 10 / 2.5 ' returns 4</paragraph> +<paragraph id="par_id3145273" role="bascode" xml-lang="en-US"> Print 10 Mod 5 ' returns 0</paragraph> +<paragraph id="par_id3150011" role="bascode" xml-lang="en-US"> Print 10 / 5 ' returns 2</paragraph> +<paragraph id="par_id3149483" role="bascode" xml-lang="en-US"> Print 5 Mod 10 ' returns 5</paragraph> +<paragraph id="par_id3151114" role="bascode" xml-lang="en-US"> Print 5 / 10 ' returns 0.5</paragraph> <paragraph id="par_idm1340841712" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_id3151112" role="bascode" xml-lang="en-US">' rounded Pi = 3.14159 Is a predefined constant</paragraph> <paragraph id="par_idm1340867552" role="bascode" localize="false" xml-lang="en-US">Dim d1 As Double</paragraph> <paragraph id="par_idm1340866320" role="bascode" localize="false" xml-lang="en-US">Dim d2 As Double</paragraph> -<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the side adjacent to the angle: ","Adjacent")</paragraph> -<paragraph id="par_id3149482" role="bascode" xml-lang="en-US"> d2 = InputBox("Enter the length of the side opposite the angle: ","Opposite")</paragraph> -<paragraph id="par_id3155415" role="bascode" xml-lang="en-US"> Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees"</paragraph> +<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the side adjacent to the angle: ","Adjacent")</paragraph> +<paragraph id="par_id3149482" role="bascode" xml-lang="en-US"> d2 = InputBox("Enter the length of the side opposite the angle: ","Opposite")</paragraph> +<paragraph id="par_id3155415" role="bascode" xml-lang="en-US"> Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees"</paragraph> <paragraph id="par_idm1340859728" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341562416" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCosinus</paragraph> <paragraph id="par_id3150010" role="bascode" xml-lang="en-US">' rounded Pi = 3.14159</paragraph> <paragraph id="par_idm1341559424" role="bascode" localize="false" xml-lang="en-US">Dim d1 As Double, dAngle As Double</paragraph> -<paragraph id="par_id3144764" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the adjacent side: ","Adjacent")</paragraph> -<paragraph id="par_id3154491" role="bascode" xml-lang="en-US"> dAngle = InputBox("Enter the angle Alpha (in degrees): ","Alpha")</paragraph> -<paragraph id="par_id3151074" role="bascode" xml-lang="en-US"> Print "The length of the hypothenuse is"; (d1 / cos (dAngle * Pi / 180))</paragraph> +<paragraph id="par_id3144764" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the adjacent side: ","Adjacent")</paragraph> +<paragraph id="par_id3154491" role="bascode" xml-lang="en-US"> dAngle = InputBox("Enter the angle Alpha (in degrees): ","Alpha")</paragraph> +<paragraph id="par_id3151074" role="bascode" xml-lang="en-US"> Print "The length of the hypothenuse is"; (d1 / cos (dAngle * Pi / 180))</paragraph> <paragraph id="par_idm1341552832" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_id3150011" role="bascode" xml-lang="en-US">' Pi = 3.1415926 is a predefined variable</paragraph> <paragraph id="par_idm1341559440" role="bascode" localize="false" xml-lang="en-US">Dim d1 As Double</paragraph> <paragraph id="par_idm1341558208" role="bascode" localize="false" xml-lang="en-US">Dim dAlpha As Double</paragraph> -<paragraph id="par_id3145251" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the opposite side: ","Opposite Side")</paragraph> -<paragraph id="par_id3148456" role="bascode" xml-lang="en-US"> dAlpha = InputBox("Enter the angle Alpha (in degrees): ","Alpha")</paragraph> -<paragraph id="par_id3153877" role="bascode" xml-lang="en-US"> Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180))</paragraph> +<paragraph id="par_id3145251" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the opposite side: ","Opposite Side")</paragraph> +<paragraph id="par_id3148456" role="bascode" xml-lang="en-US"> dAlpha = InputBox("Enter the angle Alpha (in degrees): ","Alpha")</paragraph> +<paragraph id="par_id3153877" role="bascode" xml-lang="en-US"> Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180))</paragraph> <paragraph id="par_idm1341551616" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_id3153158" role="bascode" xml-lang="en-US">' Pi = 3.1415926 is a pre-defined variable</paragraph> <paragraph id="par_idm1340783712" role="bascode" localize="false" xml-lang="en-US">Dim d1 As Double</paragraph> <paragraph id="par_idm1340782480" role="bascode" localize="false" xml-lang="en-US">Dim dAlpha As Double</paragraph> -<paragraph id="par_id3145252" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the side opposite the angle: ","opposite")</paragraph> -<paragraph id="par_id3149582" role="bascode" xml-lang="en-US"> dAlpha = InputBox("Enter the Alpha angle (in degrees): ","Alpha")</paragraph> -<paragraph id="par_id3154016" role="bascode" xml-lang="en-US"> Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))</paragraph> +<paragraph id="par_id3145252" role="bascode" xml-lang="en-US"> d1 = InputBox("Enter the length of the side opposite the angle: ","opposite")</paragraph> +<paragraph id="par_id3149582" role="bascode" xml-lang="en-US"> dAlpha = InputBox("Enter the Alpha angle (in degrees): ","Alpha")</paragraph> +<paragraph id="par_id3154016" role="bascode" xml-lang="en-US"> Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))</paragraph> <paragraph id="par_idm1340775872" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1206717456" role="bascode" localize="false" xml-lang="en-US">Sub ExampleLogExp</paragraph> <paragraph id="par_idm1206716352" role="bascode" localize="false" xml-lang="en-US">Dim dValue As Double</paragraph> -<paragraph id="par_idm1206715248" role="bascode" localize="false" xml-lang="en-US"> Const b1=12.345e12</paragraph> +<paragraph id="par_idm1206715248" role="bascode" localize="false" xml-lang="en-US"> Const b1=12.345e12</paragraph> <paragraph id="par_id3159254" role="bascode" xml-lang="en-US">Const b2=1.345e34</paragraph> -<paragraph id="par_idm1206712560" role="bascode" localize="false" xml-lang="en-US"> dValue=Exp( Log(b1)+Log(b2) )</paragraph> -<paragraph id="par_id3161832" role="bascode" xml-lang="en-US"> MsgBox "" & dValue & chr(13) & (b1*b2) ,0,"Multiplication by logarithm"</paragraph> +<paragraph id="par_idm1206712560" role="bascode" localize="false" xml-lang="en-US"> dValue=Exp( Log(b1)+Log(b2) )</paragraph> +<paragraph id="par_id3161832" role="bascode" xml-lang="en-US"> MsgBox "" & dValue & chr(13) & (b1*b2) ,0,"Multiplication by logarithm"</paragraph> <paragraph id="par_idm1206709680" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341570112" role="bascode" localize="false" xml-lang="en-US">Dim a As Double</paragraph> <paragraph id="par_idm1341568880" role="bascode" localize="false" xml-lang="en-US">Dim Const b1=12.345e12</paragraph> <paragraph id="par_idm1341567648" role="bascode" localize="false" xml-lang="en-US">Dim Const b2=1.345e34</paragraph> -<paragraph id="par_idm1341566416" role="bascode" localize="false" xml-lang="en-US"> a=Exp( Log(b1)+Log(b2) )</paragraph> -<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function"</paragraph> +<paragraph id="par_idm1341566416" role="bascode" localize="false" xml-lang="en-US"> a=Exp( Log(b1)+Log(b2) )</paragraph> +<paragraph id="par_id3149262" role="bascode" xml-lang="en-US"> MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function"</paragraph> <paragraph id="par_idm1341563312" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340800064" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomize</paragraph> <paragraph id="par_idm1340798832" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer, iVar As Integer, sText As String</paragraph> <paragraph id="par_idm1340797584" role="bascode" localize="false" xml-lang="en-US">Dim iSpectral(10) As Integer</paragraph> -<paragraph id="par_idm1340796336" role="bascode" localize="false" xml-lang="en-US"> Randomize 2^14-1</paragraph> -<paragraph id="par_idm1340795104" role="bascode" localize="false" xml-lang="en-US"> For iCount = 1 To 1000</paragraph> -<paragraph id="par_id3147288" role="bascode" xml-lang="en-US"> iVar = Int(10 * Rnd) ' Range from 0 to 9</paragraph> -<paragraph id="par_idm1340792112" role="bascode" localize="false" xml-lang="en-US"> iSpectral(iVar) = iSpectral(iVar) +1</paragraph> -<paragraph id="par_idm1340790848" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_idm1341621328" role="bascode" localize="false" xml-lang="en-US"> sText = " | "</paragraph> -<paragraph id="par_idm1341620096" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 9</paragraph> -<paragraph id="par_idm1341618864" role="bascode" localize="false" xml-lang="en-US"> sText = sText & iSpectral(iCount) & " | "</paragraph> -<paragraph id="par_idm1341617536" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_id3148617" role="bascode" xml-lang="en-US"> MsgBox sText,0,"Spectral Distribution"</paragraph> +<paragraph id="par_idm1340796336" role="bascode" localize="false" xml-lang="en-US"> Randomize 2^14-1</paragraph> +<paragraph id="par_idm1340795104" role="bascode" localize="false" xml-lang="en-US"> For iCount = 1 To 1000</paragraph> +<paragraph id="par_id3147288" role="bascode" xml-lang="en-US"> iVar = Int(10 * Rnd) ' Range from 0 to 9</paragraph> +<paragraph id="par_idm1340792112" role="bascode" localize="false" xml-lang="en-US"> iSpectral(iVar) = iSpectral(iVar) +1</paragraph> +<paragraph id="par_idm1340790848" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_idm1341621328" role="bascode" localize="false" xml-lang="en-US"> sText = " | "</paragraph> +<paragraph id="par_idm1341620096" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 9</paragraph> +<paragraph id="par_idm1341618864" role="bascode" localize="false" xml-lang="en-US"> sText = sText & iSpectral(iCount) & " | "</paragraph> +<paragraph id="par_idm1341617536" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_id3148617" role="bascode" xml-lang="en-US"> MsgBox sText,0,"Spectral Distribution"</paragraph> <paragraph id="par_idm1341614560" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> <section id="relatedtopics"> 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 @@ <bascode> <paragraph id="par_idm1341382704" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomSelect</paragraph> <paragraph id="par_idm1341381472" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> -<paragraph id="par_idm1341380240" role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> -<paragraph id="par_idm1341378992" role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> -<paragraph id="par_idm1341377760" role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> -<paragraph id="par_id3147124" role="bascode" xml-lang="en-US"> Print "Number from 1 to 5"</paragraph> -<paragraph id="par_idm1341374800" role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> -<paragraph id="par_id3154943" role="bascode" xml-lang="en-US"> Print "Number from 6 to 8"</paragraph> -<paragraph id="par_idm1341371792" role="bascode" localize="false" xml-lang="en-US"> Case Is > 8 And iVar < 11</paragraph> -<paragraph id="par_id3151074" role="bascode" xml-lang="en-US"> Print "Greater than 8"</paragraph> -<paragraph id="par_idm1341368768" role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> -<paragraph id="par_id3155602" role="bascode" xml-lang="en-US"> Print "Outside range 1 to 10"</paragraph> -<paragraph id="par_idm1341365792" role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> +<paragraph id="par_idm1341380240" role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> +<paragraph id="par_idm1341378992" role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> +<paragraph id="par_idm1341377760" role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> +<paragraph id="par_id3147124" role="bascode" xml-lang="en-US"> Print "Number from 1 to 5"</paragraph> +<paragraph id="par_idm1341374800" role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> +<paragraph id="par_id3154943" role="bascode" xml-lang="en-US"> Print "Number from 6 to 8"</paragraph> +<paragraph id="par_idm1341371792" role="bascode" localize="false" xml-lang="en-US"> Case Is > 8 And iVar < 11</paragraph> +<paragraph id="par_id3151074" role="bascode" xml-lang="en-US"> Print "Greater than 8"</paragraph> +<paragraph id="par_idm1341368768" role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> +<paragraph id="par_id3155602" role="bascode" xml-lang="en-US"> Print "Outside range 1 to 10"</paragraph> +<paragraph id="par_idm1341365792" role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> <paragraph id="par_idm1341364560" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> <section id="relatedtopics"> 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 @@ <bascode> <paragraph id="par_idm1341602560" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSqr</paragraph> <paragraph id="par_idm1341601328" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Single</paragraph> -<paragraph id="par_idm1341600096" role="bascode" localize="false" xml-lang="en-US"> iVar = 36</paragraph> -<paragraph id="par_idm1341598864" role="bascode" localize="false" xml-lang="en-US"> MsgBox Sqr(iVar)</paragraph> +<paragraph id="par_idm1341600096" role="bascode" localize="false" xml-lang="en-US"> iVar = 36</paragraph> +<paragraph id="par_idm1341598864" role="bascode" localize="false" xml-lang="en-US"> MsgBox Sqr(iVar)</paragraph> <paragraph id="par_idm1341597632" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3150447" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341085216" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFix</paragraph> -<paragraph id="par_id3156214" role="bascode" xml-lang="en-US"> Print Fix(3.14159) ' returns 3.</paragraph> -<paragraph id="par_id3154217" role="bascode" xml-lang="en-US"> Print Fix(0) ' returns 0.</paragraph> -<paragraph id="par_id3145786" role="bascode" xml-lang="en-US"> Print Fix(-3.14159) ' returns -3.</paragraph> +<paragraph id="par_id3156214" role="bascode" xml-lang="en-US"> Print Fix(3.14159) ' returns 3.</paragraph> +<paragraph id="par_id3154217" role="bascode" xml-lang="en-US"> Print Fix(0) ' returns 0.</paragraph> +<paragraph id="par_id3145786" role="bascode" xml-lang="en-US"> Print Fix(-3.14159) ' returns -3.</paragraph> <paragraph id="par_idm1341078800" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3148672" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340837808" role="bascode" localize="false" xml-lang="en-US">Sub ExampleInt</paragraph> -<paragraph id="par_id3125864" role="bascode" xml-lang="en-US"> Print Int(3.99) ' returns the value 3</paragraph> -<paragraph id="par_id3145787" role="bascode" xml-lang="en-US"> Print Int(0) ' returns the value 0</paragraph> -<paragraph id="par_id3153143" role="bascode" xml-lang="en-US"> Print Int(-3.14159) ' returns the value -4</paragraph> +<paragraph id="par_id3125864" role="bascode" xml-lang="en-US"> Print Int(3.99) ' returns the value 3</paragraph> +<paragraph id="par_id3145787" role="bascode" xml-lang="en-US"> Print Int(0) ' returns the value 0</paragraph> +<paragraph id="par_id3153143" role="bascode" xml-lang="en-US"> Print Int(-3.14159) ' returns the value -4</paragraph> <paragraph id="par_idm1340831360" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341574768" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDifference</paragraph> <paragraph id="par_idm1341573536" role="bascode" localize="false" xml-lang="en-US">Dim siW1 As Single</paragraph> <paragraph id="par_idm1341572304" role="bascode" localize="false" xml-lang="en-US">Dim siW2 As Single</paragraph> -<paragraph id="par_id3145786" role="bascode" xml-lang="en-US"> siW1 = Int(InputBox("Please enter the first amount","Value Input"))</paragraph> -<paragraph id="par_id3149561" role="bascode" xml-lang="en-US"> siW2 = Int(InputBox("Please enter the second amount","Value Input"))</paragraph> -<paragraph id="par_id3145750" role="bascode" xml-lang="en-US"> Print "The difference is "; Abs(siW1 - siW2)</paragraph> +<paragraph id="par_id3145786" role="bascode" xml-lang="en-US"> siW1 = Int(InputBox("Please enter the first amount","Value Input"))</paragraph> +<paragraph id="par_id3149561" role="bascode" xml-lang="en-US"> siW2 = Int(InputBox("Please enter the second amount","Value Input"))</paragraph> +<paragraph id="par_id3145750" role="bascode" xml-lang="en-US"> Print "The difference is "; Abs(siW1 - siW2)</paragraph> <paragraph id="par_idm1341565744" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3152576" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340806400" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSgn</paragraph> -<paragraph id="par_id3155416" role="bascode" xml-lang="en-US"> Print sgn(-10) ' returns -1</paragraph> -<paragraph id="par_id3154096" role="bascode" xml-lang="en-US"> Print sgn(0) ' returns 0</paragraph> -<paragraph id="par_id3148457" role="bascode" xml-lang="en-US"> Print sgn(10) ' returns 1</paragraph> +<paragraph id="par_id3155416" role="bascode" xml-lang="en-US"> Print sgn(-10) ' returns -1</paragraph> +<paragraph id="par_id3154096" role="bascode" xml-lang="en-US"> Print sgn(0) ' returns 0</paragraph> +<paragraph id="par_id3148457" role="bascode" xml-lang="en-US"> Print sgn(10) ' returns 1</paragraph> <paragraph id="par_idm1340799936" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340898144" role="bascode" localize="false" xml-lang="en-US">Sub ExampleHex</paragraph> <paragraph id="par_id3156214" role="bascode" xml-lang="en-US">' uses BasicFormulas in $[officename] Calc</paragraph> <paragraph id="par_idm1340895168" role="bascode" localize="false" xml-lang="en-US">Dim a2, b2, c2 As String</paragraph> -<paragraph id="par_idm1340893920" role="bascode" localize="false" xml-lang="en-US"> a2 = "&H3E8"</paragraph> -<paragraph id="par_idm1340892688" role="bascode" localize="false" xml-lang="en-US"> b2 = Hex2Int(a2)</paragraph> -<paragraph id="par_idm1340891456" role="bascode" localize="false" xml-lang="en-US"> MsgBox b2</paragraph> -<paragraph id="par_idm1340890224" role="bascode" localize="false" xml-lang="en-US"> c2 = Int2Hex(b2)</paragraph> -<paragraph id="par_idm1340888992" role="bascode" localize="false" xml-lang="en-US"> MsgBox c2</paragraph> +<paragraph id="par_idm1340893920" role="bascode" localize="false" xml-lang="en-US"> a2 = "&H3E8"</paragraph> +<paragraph id="par_idm1340892688" role="bascode" localize="false" xml-lang="en-US"> b2 = Hex2Int(a2)</paragraph> +<paragraph id="par_idm1340891456" role="bascode" localize="false" xml-lang="en-US"> MsgBox b2</paragraph> +<paragraph id="par_idm1340890224" role="bascode" localize="false" xml-lang="en-US"> c2 = Int2Hex(b2)</paragraph> +<paragraph id="par_idm1340888992" role="bascode" localize="false" xml-lang="en-US"> MsgBox c2</paragraph> <paragraph id="par_idm1340887760" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340886528" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340885280" role="bascode" localize="false" xml-lang="en-US">Function Hex2Int( sHex As String ) As Long</paragraph> <paragraph id="par_id3149262" role="bascode" xml-lang="en-US">' Returns a long integer from a hexadecimal value.</paragraph> -<paragraph id="par_idm1340882272" role="bascode" localize="false" xml-lang="en-US"> Hex2Int = clng( sHex )</paragraph> +<paragraph id="par_idm1340882272" role="bascode" localize="false" xml-lang="en-US"> Hex2Int = clng( sHex )</paragraph> <paragraph id="par_idm1340881024" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> <paragraph id="par_idm1340879792" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340878592" role="bascode" localize="false" xml-lang="en-US">Function Int2Hex( iLong As Long) As String</paragraph> <paragraph id="par_id3147215" role="bascode" xml-lang="en-US">' Calculates a hexadecimal value in integer.</paragraph> -<paragraph id="par_idm1340875584" role="bascode" localize="false" xml-lang="en-US"> Int2Hex = "&H" & Hex( iLong )</paragraph> +<paragraph id="par_idm1340875584" role="bascode" localize="false" xml-lang="en-US"> Int2Hex = "&H" & Hex( iLong )</paragraph> <paragraph id="par_idm1340874336" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3148672" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340708272" role="bascode" localize="false" xml-lang="en-US">Sub ExampleOct</paragraph> -<paragraph id="par_idm1340707040" role="bascode" localize="false" xml-lang="en-US"> MsgBox Oct(255)</paragraph> +<paragraph id="par_idm1340707040" role="bascode" localize="false" xml-lang="en-US"> MsgBox Oct(255)</paragraph> <paragraph id="par_idm1340705808" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341422592" role="bascode" localize="false" xml-lang="en-US">Sub ExampleIfThenDate</paragraph> <paragraph id="par_idm1341421360" role="bascode" localize="false" xml-lang="en-US">Dim sDate As String</paragraph> <paragraph id="par_idm1341420128" role="bascode" localize="false" xml-lang="en-US">Dim sToday As String</paragraph> -<paragraph id="par_id3154490" role="bascode" xml-lang="en-US"> sDate = InputBox("Enter the expiration date (MM.DD.YYYY)")</paragraph> -<paragraph id="par_idm1341417136" role="bascode" localize="false" xml-lang="en-US"> sDate = Right$(sDate, 4) + Mid$(sDate, 4, 2) + Left$(sDate, 2)</paragraph> -<paragraph id="par_idm1341415856" role="bascode" localize="false" xml-lang="en-US"> sToday = Date$</paragraph> -<paragraph id="par_idm1341414624" role="bascode" localize="false" xml-lang="en-US"> sToday = Right$(sToday, 4)+ Mid$(sToday, 4, 2) + Left$(sToday, 2)</paragraph> -<paragraph id="par_idm1341413344" role="bascode" localize="false" xml-lang="en-US"> If sDate < sToday Then</paragraph> -<paragraph id="par_id3155601" role="bascode" xml-lang="en-US"> MsgBox "The expiration date has passed"</paragraph> -<paragraph id="par_idm1341410352" role="bascode" localize="false" xml-lang="en-US"> ElseIf sDate > sToday Then</paragraph> -<paragraph id="par_id3146912" role="bascode" xml-lang="en-US"> MsgBox "The expiration date has not yet passed"</paragraph> -<paragraph id="par_idm1341407312" role="bascode" localize="false" xml-lang="en-US"> Else</paragraph> -<paragraph id="par_id3154754" role="bascode" xml-lang="en-US"> MsgBox "The expiration date is today"</paragraph> -<paragraph id="par_idm1341404336" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_id3154490" role="bascode" xml-lang="en-US"> sDate = InputBox("Enter the expiration date (MM.DD.YYYY)")</paragraph> +<paragraph id="par_idm1341417136" role="bascode" localize="false" xml-lang="en-US"> sDate = Right$(sDate, 4) + Mid$(sDate, 4, 2) + Left$(sDate, 2)</paragraph> +<paragraph id="par_idm1341415856" role="bascode" localize="false" xml-lang="en-US"> sToday = Date$</paragraph> +<paragraph id="par_idm1341414624" role="bascode" localize="false" xml-lang="en-US"> sToday = Right$(sToday, 4)+ Mid$(sToday, 4, 2) + Left$(sToday, 2)</paragraph> +<paragraph id="par_idm1341413344" role="bascode" localize="false" xml-lang="en-US"> If sDate < sToday Then</paragraph> +<paragraph id="par_id3155601" role="bascode" xml-lang="en-US"> MsgBox "The expiration date has passed"</paragraph> +<paragraph id="par_idm1341410352" role="bascode" localize="false" xml-lang="en-US"> ElseIf sDate > sToday Then</paragraph> +<paragraph id="par_id3146912" role="bascode" xml-lang="en-US"> MsgBox "The expiration date has not yet passed"</paragraph> +<paragraph id="par_idm1341407312" role="bascode" localize="false" xml-lang="en-US"> Else</paragraph> +<paragraph id="par_id3154754" role="bascode" xml-lang="en-US"> MsgBox "The expiration date is today"</paragraph> +<paragraph id="par_idm1341404336" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> <paragraph id="par_idm1341403104" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341173760" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomSelect</paragraph> <paragraph id="par_idm1341172528" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> -<paragraph id="par_idm1341171296" role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> -<paragraph id="par_idm1341170048" role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> -<paragraph id="par_idm1341168816" role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> -<paragraph id="par_id3152597" role="bascode" xml-lang="en-US"> Print "Number from 1 to 5"</paragraph> -<paragraph id="par_idm1341165856" role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> -<paragraph id="par_id3147349" role="bascode" xml-lang="en-US"> Print "Number from 6 to 8"</paragraph> -<paragraph id="par_idm1341162896" role="bascode" localize="false" xml-lang="en-US"> Case 8 To 10</paragraph> -<paragraph id="par_id3152886" role="bascode" xml-lang="en-US"> Print "Greater than 8"</paragraph> -<paragraph id="par_idm1340795200" role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> -<paragraph id="par_id3146975" role="bascode" xml-lang="en-US"> Print "Out of range 1 to 10"</paragraph> -<paragraph id="par_idm1340792224" role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> +<paragraph id="par_idm1341171296" role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> +<paragraph id="par_idm1341170048" role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> +<paragraph id="par_idm1341168816" role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> +<paragraph id="par_id3152597" role="bascode" xml-lang="en-US"> Print "Number from 1 to 5"</paragraph> +<paragraph id="par_idm1341165856" role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> +<paragraph id="par_id3147349" role="bascode" xml-lang="en-US"> Print "Number from 6 to 8"</paragraph> +<paragraph id="par_idm1341162896" role="bascode" localize="false" xml-lang="en-US"> Case 8 To 10</paragraph> +<paragraph id="par_id3152886" role="bascode" xml-lang="en-US"> Print "Greater than 8"</paragraph> +<paragraph id="par_idm1340795200" role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> +<paragraph id="par_id3146975" role="bascode" xml-lang="en-US"> Print "Out of range 1 to 10"</paragraph> +<paragraph id="par_idm1340792224" role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> <paragraph id="par_idm1340790992" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341080208" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDoLoop</paragraph> <paragraph id="par_idm1341078976" role="bascode" localize="false" xml-lang="en-US">Dim sFile As String</paragraph> <paragraph id="par_idm1341077744" role="bascode" localize="false" xml-lang="en-US">Dim sPath As String</paragraph> -<paragraph id="par_idm1341076512" role="bascode" localize="false" xml-lang="en-US"> sPath = "c:\"</paragraph> -<paragraph id="par_idm1341075280" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$( sPath ,22)</paragraph> -<paragraph id="par_idm1341074032" role="bascode" localize="false" xml-lang="en-US"> If sFile <> "" Then</paragraph> -<paragraph id="par_idm1341072656" role="bascode" localize="false" xml-lang="en-US"> Do</paragraph> -<paragraph id="par_idm1341071456" role="bascode" localize="false" xml-lang="en-US"> MsgBox sFile</paragraph> -<paragraph id="par_idm1341070208" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$</paragraph> -<paragraph id="par_idm1341068960" role="bascode" localize="false" xml-lang="en-US"> Loop Until sFile = ""</paragraph> -<paragraph id="par_idm1341067712" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341076512" role="bascode" localize="false" xml-lang="en-US"> sPath = "c:\"</paragraph> +<paragraph id="par_idm1341075280" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$( sPath ,22)</paragraph> +<paragraph id="par_idm1341074032" role="bascode" localize="false" xml-lang="en-US"> If sFile <> "" Then</paragraph> +<paragraph id="par_idm1341072656" role="bascode" localize="false" xml-lang="en-US"> Do</paragraph> +<paragraph id="par_idm1341071456" role="bascode" localize="false" xml-lang="en-US"> MsgBox sFile</paragraph> +<paragraph id="par_idm1341070208" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$</paragraph> +<paragraph id="par_idm1341068960" role="bascode" localize="false" xml-lang="en-US"> Loop Until sFile = ""</paragraph> +<paragraph id="par_idm1341067712" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> <paragraph id="par_idm1341066480" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340516080" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer</paragraph> <paragraph id="par_idm1340514848" role="bascode" localize="false" xml-lang="en-US">Dim iCount2 As Integer</paragraph> <paragraph id="par_idm1340513616" role="bascode" localize="false" xml-lang="en-US">Dim sTemp As String</paragraph> -<paragraph id="par_id3155767" role="bascode" xml-lang="en-US"> sEntry(0) = "Jerry"</paragraph> -<paragraph id="par_id3153711" role="bascode" xml-lang="en-US"> sEntry(1) = "Patty"</paragraph> -<paragraph id="par_id3148993" role="bascode" xml-lang="en-US"> sEntry(2) = "Kurt"</paragraph> -<paragraph id="par_id3156382" role="bascode" xml-lang="en-US"> sEntry(3) = "Thomas"</paragraph> -<paragraph id="par_id3155174" role="bascode" xml-lang="en-US"> sEntry(4) = "Michael"</paragraph> -<paragraph id="par_id3166448" role="bascode" xml-lang="en-US"> sEntry(5) = "David"</paragraph> -<paragraph id="par_id3149255" role="bascode" xml-lang="en-US"> sEntry(6) = "Cathy"</paragraph> -<paragraph id="par_id3149565" role="bascode" xml-lang="en-US"> sEntry(7) = "Susie"</paragraph> -<paragraph id="par_id3145148" role="bascode" xml-lang="en-US"> sEntry(8) = "Edward"</paragraph> -<paragraph id="par_id3145229" role="bascode" xml-lang="en-US"> sEntry(9) = "Christine"</paragraph> -<paragraph id="par_idm1340495152" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 9</paragraph> -<paragraph id="par_idm1340493920" role="bascode" localize="false" xml-lang="en-US"> For iCount2 = iCount + 1 To 9</paragraph> -<paragraph id="par_idm1340492672" role="bascode" localize="false" xml-lang="en-US"> If sEntry(iCount) > sEntry(iCount2) Then</paragraph> -<paragraph id="par_idm1340491296" role="bascode" localize="false" xml-lang="en-US"> sTemp = sEntry(iCount)</paragraph> -<paragraph id="par_idm1340490096" role="bascode" localize="false" xml-lang="en-US"> sEntry(iCount) = sEntry(iCount2)</paragraph> -<paragraph id="par_idm1340488832" role="bascode" localize="false" xml-lang="en-US"> sEntry(iCount2) = sTemp</paragraph> -<paragraph id="par_idm1340487584" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1340486352" role="bascode" localize="false" xml-lang="en-US"> Next iCount2</paragraph> -<paragraph id="par_idm1340485120" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_idm1340483888" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 9</paragraph> -<paragraph id="par_idm1340482656" role="bascode" localize="false" xml-lang="en-US"> Print sEntry(iCount)</paragraph> -<paragraph id="par_idm1340481408" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_id3155767" role="bascode" xml-lang="en-US"> sEntry(0) = "Jerry"</paragraph> +<paragraph id="par_id3153711" role="bascode" xml-lang="en-US"> sEntry(1) = "Patty"</paragraph> +<paragraph id="par_id3148993" role="bascode" xml-lang="en-US"> sEntry(2) = "Kurt"</paragraph> +<paragraph id="par_id3156382" role="bascode" xml-lang="en-US"> sEntry(3) = "Thomas"</paragraph> +<paragraph id="par_id3155174" role="bascode" xml-lang="en-US"> sEntry(4) = "Michael"</paragraph> +<paragraph id="par_id3166448" role="bascode" xml-lang="en-US"> sEntry(5) = "David"</paragraph> +<paragraph id="par_id3149255" role="bascode" xml-lang="en-US"> sEntry(6) = "Cathy"</paragraph> +<paragraph id="par_id3149565" role="bascode" xml-lang="en-US"> sEntry(7) = "Susie"</paragraph> +<paragraph id="par_id3145148" role="bascode" xml-lang="en-US"> sEntry(8) = "Edward"</paragraph> +<paragraph id="par_id3145229" role="bascode" xml-lang="en-US"> sEntry(9) = "Christine"</paragraph> +<paragraph id="par_idm1340495152" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 9</paragraph> +<paragraph id="par_idm1340493920" role="bascode" localize="false" xml-lang="en-US"> For iCount2 = iCount + 1 To 9</paragraph> +<paragraph id="par_idm1340492672" role="bascode" localize="false" xml-lang="en-US"> If sEntry(iCount) > sEntry(iCount2) Then</paragraph> +<paragraph id="par_idm1340491296" role="bascode" localize="false" xml-lang="en-US"> sTemp = sEntry(iCount)</paragraph> +<paragraph id="par_idm1340490096" role="bascode" localize="false" xml-lang="en-US"> sEntry(iCount) = sEntry(iCount2)</paragraph> +<paragraph id="par_idm1340488832" role="bascode" localize="false" xml-lang="en-US"> sEntry(iCount2) = sTemp</paragraph> +<paragraph id="par_idm1340487584" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1340486352" role="bascode" localize="false" xml-lang="en-US"> Next iCount2</paragraph> +<paragraph id="par_idm1340485120" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_idm1340483888" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 9</paragraph> +<paragraph id="par_idm1340482656" role="bascode" localize="false" xml-lang="en-US"> Print sEntry(iCount)</paragraph> +<paragraph id="par_idm1340481408" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> <paragraph id="par_idm1340480176" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341590256" role="bascode" localize="false" xml-lang="en-US">Dim iInputa As Single</paragraph> <paragraph id="par_idm1341589024" role="bascode" localize="false" xml-lang="en-US">Dim iInputb As Single</paragraph> <paragraph id="par_idm1341587792" role="bascode" localize="false" xml-lang="en-US">Dim iInputc As Single</paragraph> -<paragraph id="par_id3146970" role="bascode" xml-lang="en-US"> iInputa = Int(InputBox("Enter the first number: ","NumberInput"))</paragraph> -<paragraph id="par_id3150329" role="bascode" xml-lang="en-US"> iInputb = Int(InputBox("Enter the second number: ","NumberInput"))</paragraph> -<paragraph id="par_idm1341583040" role="bascode" localize="false" xml-lang="en-US"> iInputc=iInputa</paragraph> -<paragraph id="par_idm1341581808" role="bascode" localize="false" xml-lang="en-US"> GoSub SquareRoot</paragraph> -<paragraph id="par_id3154756" role="bascode" xml-lang="en-US"> Print "The square root of";iInputa;" is";iInputc</paragraph> -<paragraph id="par_idm1341578832" role="bascode" localize="false" xml-lang="en-US"> iInputc=iInputb</paragraph> -<paragraph id="par_idm1341577600" role="bascode" localize="false" xml-lang="en-US"> GoSub SquareRoot</paragraph> -<paragraph id="par_id3147340" role="bascode" xml-lang="en-US"> Print "The square root of";iInputb;" is";iInputc</paragraph> -<paragraph id="par_idm1341574624" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> +<paragraph id="par_id3146970" role="bascode" xml-lang="en-US"> iInputa = Int(InputBox("Enter the first number: ","NumberInput"))</paragraph> +<paragraph id="par_id3150329" role="bascode" xml-lang="en-US"> iInputb = Int(InputBox("Enter the second number: ","NumberInput"))</paragraph> +<paragraph id="par_idm1341583040" role="bascode" localize="false" xml-lang="en-US"> iInputc=iInputa</paragraph> +<paragraph id="par_idm1341581808" role="bascode" localize="false" xml-lang="en-US"> GoSub SquareRoot</paragraph> +<paragraph id="par_id3154756" role="bascode" xml-lang="en-US"> Print "The square root of";iInputa;" is";iInputc</paragraph> +<paragraph id="par_idm1341578832" role="bascode" localize="false" xml-lang="en-US"> iInputc=iInputb</paragraph> +<paragraph id="par_idm1341577600" role="bascode" localize="false" xml-lang="en-US"> GoSub SquareRoot</paragraph> +<paragraph id="par_id3147340" role="bascode" xml-lang="en-US"> Print "The square root of";iInputb;" is";iInputc</paragraph> +<paragraph id="par_idm1341574624" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> <paragraph id="par_idm1341573392" role="bascode" localize="false" xml-lang="en-US">SquareRoot:</paragraph> -<paragraph id="par_idm1341572160" role="bascode" localize="false" xml-lang="en-US"> iInputc=sqr(iInputc)</paragraph> -<paragraph id="par_idm1341570912" role="bascode" localize="false" xml-lang="en-US"> Return</paragraph> +<paragraph id="par_idm1341572160" role="bascode" localize="false" xml-lang="en-US"> iInputc=sqr(iInputc)</paragraph> +<paragraph id="par_idm1341570912" role="bascode" localize="false" xml-lang="en-US"> Return</paragraph> <paragraph id="par_idm1341569680" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341610144" role="bascode" localize="false" xml-lang="en-US">Sub ExampleOnGosub</paragraph> <paragraph id="par_idm1341608912" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> <paragraph id="par_idm1341607680" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1341606448" role="bascode" localize="false" xml-lang="en-US"> iVar = 2</paragraph> -<paragraph id="par_idm1341605216" role="bascode" localize="false" xml-lang="en-US"> sVar =""</paragraph> -<paragraph id="par_idm1341603984" role="bascode" localize="false" xml-lang="en-US"> On iVar GoSub Sub1, Sub2</paragraph> -<paragraph id="par_idm1341602736" role="bascode" localize="false" xml-lang="en-US"> On iVar GoTo Line1, Line2</paragraph> -<paragraph id="par_idm1341601488" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> +<paragraph id="par_idm1341606448" role="bascode" localize="false" xml-lang="en-US"> iVar = 2</paragraph> +<paragraph id="par_idm1341605216" role="bascode" localize="false" xml-lang="en-US"> sVar =""</paragraph> +<paragraph id="par_idm1341603984" role="bascode" localize="false" xml-lang="en-US"> On iVar GoSub Sub1, Sub2</paragraph> +<paragraph id="par_idm1341602736" role="bascode" localize="false" xml-lang="en-US"> On iVar GoTo Line1, Line2</paragraph> +<paragraph id="par_idm1341601488" role="bascode" localize="false" xml-lang="en-US"> Exit Sub</paragraph> <paragraph id="par_idm1341600256" role="bascode" localize="false" xml-lang="en-US">Sub1:</paragraph> -<paragraph id="par_id3153948" role="bascode" xml-lang="en-US"> sVar =sVar & " From Sub 1 to" : Return</paragraph> +<paragraph id="par_id3153948" role="bascode" xml-lang="en-US"> sVar =sVar & " From Sub 1 to" : Return</paragraph> <paragraph id="par_idm1341597216" role="bascode" localize="false" xml-lang="en-US">Sub2:</paragraph> -<paragraph id="par_id3153708" role="bascode" xml-lang="en-US"> sVar =sVar & " From Sub 2 to" : Return</paragraph> +<paragraph id="par_id3153708" role="bascode" xml-lang="en-US"> sVar =sVar & " From Sub 2 to" : Return</paragraph> <paragraph id="par_idm1341594128" role="bascode" localize="false" xml-lang="en-US">Line1:</paragraph> -<paragraph id="par_id3150321" role="bascode" xml-lang="en-US"> sVar =sVar & " Label 1" : GoTo Ende</paragraph> +<paragraph id="par_id3150321" role="bascode" xml-lang="en-US"> sVar =sVar & " Label 1" : GoTo Ende</paragraph> <paragraph id="par_idm1341591088" role="bascode" localize="false" xml-lang="en-US">Line2:</paragraph> -<paragraph id="par_id3155764" role="bascode" xml-lang="en-US"> sVar =sVar & " Label 2"</paragraph> +<paragraph id="par_id3155764" role="bascode" xml-lang="en-US"> sVar =sVar & " Label 2"</paragraph> <paragraph id="par_idm1341588128" role="bascode" localize="false" xml-lang="en-US">Ende:</paragraph> -<paragraph id="par_idm1341586896" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar,0,"On...GoSub"</paragraph> +<paragraph id="par_idm1341586896" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar,0,"On...GoSub"</paragraph> <paragraph id="par_idm1341585648" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm871799424" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChoose</paragraph> <paragraph id="par_idm871798192" role="bascode" localize="false" xml-lang="en-US">Dim sReturn As String</paragraph> -<paragraph id="par_idm871796960" role="bascode" localize="false" xml-lang="en-US"> sReturn = ChooseMenu(2)</paragraph> -<paragraph id="par_idm871795712" role="bascode" localize="false" xml-lang="en-US"> Print sReturn</paragraph> +<paragraph id="par_idm871796960" role="bascode" localize="false" xml-lang="en-US"> sReturn = ChooseMenu(2)</paragraph> +<paragraph id="par_idm871795712" role="bascode" localize="false" xml-lang="en-US"> Print sReturn</paragraph> <paragraph id="par_idm871794480" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm871793248" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm871792000" role="bascode" localize="false" xml-lang="en-US">Function ChooseMenu(Index As Integer)</paragraph> -<paragraph id="par_id3156443" role="bascode" xml-lang="en-US"> ChooseMenu = Choose(Index, "Quick Format", "Save Format", "System Format")</paragraph> +<paragraph id="par_id3156443" role="bascode" xml-lang="en-US"> ChooseMenu = Choose(Index, "Quick Format", "Save Format", "System Format")</paragraph> <paragraph id="par_idm871788976" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340861616" role="bascode" localize="false" xml-lang="en-US">Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( Long )</paragraph> <paragraph id="par_idm1340860336" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDeclare</paragraph> <paragraph id="par_idm1340859104" role="bascode" localize="false" xml-lang="en-US">Dim lValue As Long</paragraph> -<paragraph id="par_idm1340857872" role="bascode" localize="false" xml-lang="en-US"> lValue = 5000</paragraph> -<paragraph id="par_idm1340856640" role="bascode" localize="false" xml-lang="en-US"> MyMessageBeep( lValue )</paragraph> -<paragraph id="par_idm1340855392" role="bascode" localize="false" xml-lang="en-US"> FreeLibrary("user32.dll" )</paragraph> +<paragraph id="par_idm1340857872" role="bascode" localize="false" xml-lang="en-US"> lValue = 5000</paragraph> +<paragraph id="par_idm1340856640" role="bascode" localize="false" xml-lang="en-US"> MyMessageBeep( lValue )</paragraph> +<paragraph id="par_idm1340855392" role="bascode" localize="false" xml-lang="en-US"> FreeLibrary("user32.dll" )</paragraph> <paragraph id="par_idm1340854144" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340746288" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomSelect</paragraph> <paragraph id="par_idm1340745056" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> -<paragraph id="par_idm1340743824" role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> -<paragraph id="par_idm1340742576" role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> -<paragraph id="par_idm1340741344" role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> -<paragraph id="par_id3152887" role="bascode" xml-lang="en-US"> Print "Number from 1 to 5"</paragraph> -<paragraph id="par_idm1340738336" role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> -<paragraph id="par_id3148618" role="bascode" xml-lang="en-US"> Print "Number from 6 to 8"</paragraph> -<paragraph id="par_idm1340735376" role="bascode" localize="false" xml-lang="en-US"> Case Is > 8 And iVar < 11</paragraph> -<paragraph id="par_id3147436" role="bascode" xml-lang="en-US"> Print "Greater than 8"</paragraph> -<paragraph id="par_idm1340732352" role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> -<paragraph id="par_id3150418" role="bascode" xml-lang="en-US"> Print "Outside range 1 to 10"</paragraph> -<paragraph id="par_idm1340729376" role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> +<paragraph id="par_idm1340743824" role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> +<paragraph id="par_idm1340742576" role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> +<paragraph id="par_idm1340741344" role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> +<paragraph id="par_id3152887" role="bascode" xml-lang="en-US"> Print "Number from 1 to 5"</paragraph> +<paragraph id="par_idm1340738336" role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> +<paragraph id="par_id3148618" role="bascode" xml-lang="en-US"> Print "Number from 6 to 8"</paragraph> +<paragraph id="par_idm1340735376" role="bascode" localize="false" xml-lang="en-US"> Case Is > 8 And iVar < 11</paragraph> +<paragraph id="par_id3147436" role="bascode" xml-lang="en-US"> Print "Greater than 8"</paragraph> +<paragraph id="par_idm1340732352" role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> +<paragraph id="par_id3150418" role="bascode" xml-lang="en-US"> Print "Outside range 1 to 10"</paragraph> +<paragraph id="par_idm1340729376" role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> <paragraph id="par_idm1340728144" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340895648" role="bascode" localize="false" xml-lang="en-US">Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( Long )</paragraph> <paragraph id="par_idm1340894368" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDeclare</paragraph> <paragraph id="par_idm1340893136" role="bascode" localize="false" xml-lang="en-US">Dim lValue As Long</paragraph> -<paragraph id="par_idm1340891904" role="bascode" localize="false" xml-lang="en-US"> lValue = 5000</paragraph> -<paragraph id="par_idm1340890672" role="bascode" localize="false" xml-lang="en-US"> MyMessageBeep( lValue )</paragraph> -<paragraph id="par_idm1340889424" role="bascode" localize="false" xml-lang="en-US"> FreeLibrary("user32.dll" )</paragraph> +<paragraph id="par_idm1340891904" role="bascode" localize="false" xml-lang="en-US"> lValue = 5000</paragraph> +<paragraph id="par_idm1340890672" role="bascode" localize="false" xml-lang="en-US"> MyMessageBeep( lValue )</paragraph> +<paragraph id="par_idm1340889424" role="bascode" localize="false" xml-lang="en-US"> FreeLibrary("user32.dll" )</paragraph> <paragraph id="par_idm1340888176" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340980496" role="bascode" localize="false" xml-lang="en-US">Dim sReturn As String</paragraph> <paragraph id="par_idm1340979264" role="bascode" localize="false" xml-lang="en-US">Dim sListArray(10) As String</paragraph> <paragraph id="par_idm1340978016" role="bascode" localize="false" xml-lang="en-US">Dim siStep As Single</paragraph> -<paragraph id="par_id3152939" role="bascode" xml-lang="en-US"> For siStep = 0 To 10 ' Fill array with test data</paragraph> -<paragraph id="par_idm1340975040" role="bascode" localize="false" xml-lang="en-US"> sListArray(siStep) = chr$(siStep + 65)</paragraph> -<paragraph id="par_idm1340973776" role="bascode" localize="false" xml-lang="en-US"> MsgBox sListArray(siStep)</paragraph> -<paragraph id="par_idm1340972528" role="bascode" localize="false" xml-lang="en-US"> Next siStep</paragraph> -<paragraph id="par_idm1340971296" role="bascode" localize="false" xml-lang="en-US"> sReturn = LinSearch(sListArray(), "B")</paragraph> -<paragraph id="par_idm1340970032" role="bascode" localize="false" xml-lang="en-US"> Print sReturn</paragraph> +<paragraph id="par_id3152939" role="bascode" xml-lang="en-US"> For siStep = 0 To 10 ' Fill array with test data</paragraph> +<paragraph id="par_idm1340975040" role="bascode" localize="false" xml-lang="en-US"> sListArray(siStep) = chr$(siStep + 65)</paragraph> +<paragraph id="par_idm1340973776" role="bascode" localize="false" xml-lang="en-US"> MsgBox sListArray(siStep)</paragraph> +<paragraph id="par_idm1340972528" role="bascode" localize="false" xml-lang="en-US"> Next siStep</paragraph> +<paragraph id="par_idm1340971296" role="bascode" localize="false" xml-lang="en-US"> sReturn = LinSearch(sListArray(), "B")</paragraph> +<paragraph id="par_idm1340970032" role="bascode" localize="false" xml-lang="en-US"> Print sReturn</paragraph> <paragraph id="par_idm1340968800" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340967568" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340966320" role="bascode" localize="false" xml-lang="en-US">Function LinSearch( sList(), sItem As String ) As Integer</paragraph> <paragraph id="par_idm1340965040" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer</paragraph> <paragraph id="par_id3154943" role="bascode" xml-lang="en-US">' Linsearch searches a TextArray:sList() for a TextEntry:</paragraph> <paragraph id="par_id3155601" role="bascode" xml-lang="en-US">' Return value Is the index of the entry Or 0 (Null)</paragraph> -<paragraph id="par_idm1340960304" role="bascode" localize="false" xml-lang="en-US"> For iCount=1 To Ubound( sList() )</paragraph> -<paragraph id="par_idm1340959056" role="bascode" localize="false" xml-lang="en-US"> If sList( iCount ) = sItem Then</paragraph> -<paragraph id="par_id3153707" role="bascode" xml-lang="en-US"> Exit For ' sItem found</paragraph> -<paragraph id="par_idm1340956080" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1340954848" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_idm1340953616" role="bascode" localize="false" xml-lang="en-US"> If iCount = Ubound( sList() ) Then iCount = 0</paragraph> -<paragraph id="par_idm1340952352" role="bascode" localize="false" xml-lang="en-US"> LinSearch = iCount</paragraph> +<paragraph id="par_idm1340960304" role="bascode" localize="false" xml-lang="en-US"> For iCount=1 To Ubound( sList() )</paragraph> +<paragraph id="par_idm1340959056" role="bascode" localize="false" xml-lang="en-US"> If sList( iCount ) = sItem Then</paragraph> +<paragraph id="par_id3153707" role="bascode" xml-lang="en-US"> Exit For ' sItem found</paragraph> +<paragraph id="par_idm1340956080" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1340954848" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_idm1340953616" role="bascode" localize="false" xml-lang="en-US"> If iCount = Ubound( sList() ) Then iCount = 0</paragraph> +<paragraph id="par_idm1340952352" role="bascode" localize="false" xml-lang="en-US"> LinSearch = iCount</paragraph> <paragraph id="par_idm1340951120" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340926544" role="bascode" localize="false" xml-lang="en-US">Sub ExampleMid</paragraph> <paragraph id="par_idm1340925312" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1340924080" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> -<paragraph id="par_idm1340922848" role="bascode" localize="false" xml-lang="en-US"> Print Mid(sVar,3,5) ' Returns "s Veg"</paragraph> -<paragraph id="par_id3153140" role="bascode" xml-lang="en-US"> ' Nothing occurs here</paragraph> +<paragraph id="par_idm1340924080" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> +<paragraph id="par_idm1340922848" role="bascode" localize="false" xml-lang="en-US"> Print Mid(sVar,3,5) ' Returns "s Veg"</paragraph> +<paragraph id="par_id3153140" role="bascode" xml-lang="en-US"> ' Nothing occurs here</paragraph> <paragraph id="par_idm1340919856" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341620128" role="bascode" localize="false" xml-lang="en-US">Sub ExampleStop</paragraph> <paragraph id="par_idm1341618896" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Single</paragraph> -<paragraph id="par_idm1341617664" role="bascode" localize="false" xml-lang="en-US"> iVar = 36</paragraph> -<paragraph id="par_idm1341616432" role="bascode" localize="false" xml-lang="en-US"> Stop</paragraph> -<paragraph id="par_idm1341615200" role="bascode" localize="false" xml-lang="en-US"> MsgBox Sqr(iVar)</paragraph> +<paragraph id="par_idm1341617664" role="bascode" localize="false" xml-lang="en-US"> iVar = 36</paragraph> +<paragraph id="par_idm1341616432" role="bascode" localize="false" xml-lang="en-US"> Stop</paragraph> +<paragraph id="par_idm1341615200" role="bascode" localize="false" xml-lang="en-US"> MsgBox Sqr(iVar)</paragraph> <paragraph id="par_idm1341613968" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3153770" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341148592" role="bascode" localize="false" xml-lang="en-US">Sub Example</paragraph> -<paragraph id="par_idN1063F" role="bascode" xml-lang="en-US"> ' some statements</paragraph> +<paragraph id="par_idN1063F" role="bascode" xml-lang="en-US"> ' some statements</paragraph> <paragraph id="par_idm1341146032" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341052032" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSwitch</paragraph> <paragraph id="par_idm1341050800" role="bascode" localize="false" xml-lang="en-US">Dim sGender As String</paragraph> -<paragraph id="par_id3149579" role="bascode" xml-lang="en-US"> sGender = GetGenderIndex( "John" )</paragraph> -<paragraph id="par_idm1341047840" role="bascode" localize="false" xml-lang="en-US"> MsgBox sGender</paragraph> +<paragraph id="par_id3149579" role="bascode" xml-lang="en-US"> sGender = GetGenderIndex( "John" )</paragraph> +<paragraph id="par_idm1341047840" role="bascode" localize="false" xml-lang="en-US"> MsgBox sGender</paragraph> <paragraph id="par_idm1341046608" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341045376" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341044128" role="bascode" localize="false" xml-lang="en-US">Function GetGenderIndex (sName As String) As String</paragraph> -<paragraph id="par_id3153361" role="bascode" xml-lang="en-US"> GetGenderIndex = Switch(sName = "Jane", "female", sName = "John", "male")</paragraph> +<paragraph id="par_id3153361" role="bascode" xml-lang="en-US"> GetGenderIndex = Switch(sName = "Jane", "female", sName = "John", "male")</paragraph> <paragraph id="par_idm1341041088" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341017664" role="bascode" localize="false" xml-lang="en-US">Dim sReturn As String</paragraph> <paragraph id="par_idm1341016432" role="bascode" localize="false" xml-lang="en-US">Dim sListArray(10) As String</paragraph> <paragraph id="par_idm1341015184" role="bascode" localize="false" xml-lang="en-US">Dim siStep As Single</paragraph> -<paragraph id="par_id3153158" role="bascode" xml-lang="en-US"> For siStep = 0 To 10 ' Fill array with test data</paragraph> -<paragraph id="par_idm1341012208" role="bascode" localize="false" xml-lang="en-US"> sListArray(siStep) = chr(siStep + 65)</paragraph> -<paragraph id="par_idm1341010944" role="bascode" localize="false" xml-lang="en-US"> MsgBox sListArray(siStep)</paragraph> -<paragraph id="par_idm1341009696" role="bascode" localize="false" xml-lang="en-US"> Next siStep</paragraph> -<paragraph id="par_idm1341008464" role="bascode" localize="false" xml-lang="en-US"> sReturn = LinSearch(sListArray(), "B")</paragraph> -<paragraph id="par_idm1341007200" role="bascode" localize="false" xml-lang="en-US"> Print sReturn</paragraph> +<paragraph id="par_id3153158" role="bascode" xml-lang="en-US"> For siStep = 0 To 10 ' Fill array with test data</paragraph> +<paragraph id="par_idm1341012208" role="bascode" localize="false" xml-lang="en-US"> sListArray(siStep) = chr(siStep + 65)</paragraph> +<paragraph id="par_idm1341010944" role="bascode" localize="false" xml-lang="en-US"> MsgBox sListArray(siStep)</paragraph> +<paragraph id="par_idm1341009696" role="bascode" localize="false" xml-lang="en-US"> Next siStep</paragraph> +<paragraph id="par_idm1341008464" role="bascode" localize="false" xml-lang="en-US"> sReturn = LinSearch(sListArray(), "B")</paragraph> +<paragraph id="par_idm1341007200" role="bascode" localize="false" xml-lang="en-US"> Print sReturn</paragraph> <paragraph id="par_idm1341005968" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341004736" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341003488" role="bascode" localize="false" xml-lang="en-US">Function LinSearch( sList(), sItem As String ) As Integer</paragraph> <paragraph id="par_idm1341002208" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer</paragraph> <paragraph id="par_id3153764" role="bascode" xml-lang="en-US">' LinSearch searches a TextArray:sList() for a TextEntry:</paragraph> <paragraph id="par_id3148995" role="bascode" xml-lang="en-US">' Returns the index of the entry or 0 (Null)</paragraph> -<paragraph id="par_idm1340997424" role="bascode" localize="false" xml-lang="en-US"> For iCount=1 To Ubound( sList() )</paragraph> -<paragraph id="par_idm1340996176" role="bascode" localize="false" xml-lang="en-US"> If sList( iCount ) = sItem Then</paragraph> -<paragraph id="par_id3149567" role="bascode" xml-lang="en-US"> Exit For ' sItem found</paragraph> -<paragraph id="par_idm1340993200" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1340991968" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_idm1340990736" role="bascode" localize="false" xml-lang="en-US"> If iCount = Ubound( sList() ) Then iCount = 0</paragraph> -<paragraph id="par_idm1340989472" role="bascode" localize="false" xml-lang="en-US"> LinSearch = iCount</paragraph> +<paragraph id="par_idm1340997424" role="bascode" localize="false" xml-lang="en-US"> For iCount=1 To Ubound( sList() )</paragraph> +<paragraph id="par_idm1340996176" role="bascode" localize="false" xml-lang="en-US"> If sList( iCount ) = sItem Then</paragraph> +<paragraph id="par_id3149567" role="bascode" xml-lang="en-US"> Exit For ' sItem found</paragraph> +<paragraph id="par_idm1340993200" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1340991968" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_idm1340990736" role="bascode" localize="false" xml-lang="en-US"> If iCount = Ubound( sList() ) Then iCount = 0</paragraph> +<paragraph id="par_idm1340989472" role="bascode" localize="false" xml-lang="en-US"> LinSearch = iCount</paragraph> <paragraph id="par_idm1340988240" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340987280" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCBool</paragraph> <paragraph id="par_idm1340986048" role="bascode" localize="false" xml-lang="en-US">Dim sText As String</paragraph> -<paragraph id="par_id3155132" role="bascode" xml-lang="en-US"> sText = InputBox("Please enter a short sentence:")</paragraph> -<paragraph id="par_id3155855" role="bascode" xml-lang="en-US"> ' Proof if the word »and« appears in the sentence.</paragraph> -<paragraph id="par_id3146984" role="bascode" xml-lang="en-US"> ' Instead of the command line</paragraph> -<paragraph id="par_id3148576" role="bascode" xml-lang="en-US"> ' If Instr(Input, "and")<>0 Then...</paragraph> -<paragraph id="par_id3154014" role="bascode" xml-lang="en-US"> ' the CBool function is applied as follows:</paragraph> -<paragraph id="par_id3155413" role="bascode" xml-lang="en-US"> If CBool(Instr(sText, "and")) Then</paragraph> -<paragraph id="par_id3152940" role="bascode" xml-lang="en-US"> MsgBox "The word »and« appears in the sentence you entered!"</paragraph> -<paragraph id="par_idm1340972320" role="bascode" localize="false" xml-lang="en-US"> EndIf</paragraph> +<paragraph id="par_id3155132" role="bascode" xml-lang="en-US"> sText = InputBox("Please enter a short sentence:")</paragraph> +<paragraph id="par_id3155855" role="bascode" xml-lang="en-US"> ' Proof if the word »and« appears in the sentence.</paragraph> +<paragraph id="par_id3146984" role="bascode" xml-lang="en-US"> ' Instead of the command line</paragraph> +<paragraph id="par_id3148576" role="bascode" xml-lang="en-US"> ' If Instr(Input, "and")<>0 Then...</paragraph> +<paragraph id="par_id3154014" role="bascode" xml-lang="en-US"> ' the CBool function is applied as follows:</paragraph> +<paragraph id="par_id3155413" role="bascode" xml-lang="en-US"> If CBool(Instr(sText, "and")) Then</paragraph> +<paragraph id="par_id3152940" role="bascode" xml-lang="en-US"> MsgBox "The word »and« appears in the sentence you entered!"</paragraph> +<paragraph id="par_idm1340972320" role="bascode" localize="false" xml-lang="en-US"> EndIf</paragraph> <paragraph id="par_idm1340971088" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3156422" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341009312" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCDate</paragraph> -<paragraph id="par_idm1341008080" role="bascode" localize="false" xml-lang="en-US"> MsgBox cDate(1000.25) ' 09.26.1902 06:00:00</paragraph> -<paragraph id="par_idm1341006816" role="bascode" localize="false" xml-lang="en-US"> MsgBox cDate(1001.26) ' 09.27.1902 06:14:24</paragraph> +<paragraph id="par_idm1341008080" role="bascode" localize="false" xml-lang="en-US"> MsgBox cDate(1000.25) ' 09.26.1902 06:00:00</paragraph> +<paragraph id="par_idm1341006816" role="bascode" localize="false" xml-lang="en-US"> MsgBox cDate(1001.26) ' 09.27.1902 06:14:24</paragraph> <paragraph id="par_idm1341005552" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3148797" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340893312" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCountryConvert</paragraph> -<paragraph id="par_idm1340892064" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> -<paragraph id="par_idm1340890816" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> -<paragraph id="par_idm1340889568" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> +<paragraph id="par_idm1340892064" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> +<paragraph id="par_idm1340890816" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> +<paragraph id="par_idm1340889568" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> <paragraph id="par_idm1340888320" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3145419" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341052912" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCountryConvert</paragraph> -<paragraph id="par_idm1341051664" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> -<paragraph id="par_idm1341050416" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> -<paragraph id="par_idm1341049168" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> +<paragraph id="par_idm1341051664" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> +<paragraph id="par_idm1341050416" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> +<paragraph id="par_idm1341049168" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> <paragraph id="par_idm1341047920" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3154216" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341313632" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCountryConvert</paragraph> -<paragraph id="par_idm1341312384" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> -<paragraph id="par_idm1341311136" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> -<paragraph id="par_idm1341309888" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> +<paragraph id="par_idm1341312384" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> +<paragraph id="par_idm1341311136" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> +<paragraph id="par_idm1341309888" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> <paragraph id="par_idm1341308640" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3154366" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341161984" role="bascode" localize="false" xml-lang="en-US">Sub ExampleConst</paragraph> -<paragraph id="par_idm1341160752" role="bascode" localize="false" xml-lang="en-US"> Const iVar = 1964</paragraph> -<paragraph id="par_idm1341159520" role="bascode" localize="false" xml-lang="en-US"> MsgBox iVar</paragraph> -<paragraph id="par_id3153969" role="bascode" xml-lang="en-US"> Const sVar = "Program", dVar As Double = 1.00</paragraph> -<paragraph id="par_idm1341156544" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar & " " & dVar</paragraph> +<paragraph id="par_idm1341160752" role="bascode" localize="false" xml-lang="en-US"> Const iVar = 1964</paragraph> +<paragraph id="par_idm1341159520" role="bascode" localize="false" xml-lang="en-US"> MsgBox iVar</paragraph> +<paragraph id="par_id3153969" role="bascode" xml-lang="en-US"> Const sVar = "Program", dVar As Double = 1.00</paragraph> +<paragraph id="par_idm1341156544" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar & " " & dVar</paragraph> <paragraph id="par_idm1341155296" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3149514" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341609456" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCSNG</paragraph> -<paragraph id="par_idm1341608224" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> -<paragraph id="par_idm1341606976" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> -<paragraph id="par_idm1341605728" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> -<paragraph id="par_idm1341604480" role="bascode" localize="false" xml-lang="en-US"> MsgBox CSng(1234.5678)</paragraph> +<paragraph id="par_idm1341608224" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> +<paragraph id="par_idm1341606976" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> +<paragraph id="par_idm1341605728" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> +<paragraph id="par_idm1341604480" role="bascode" localize="false" xml-lang="en-US"> MsgBox CSng(1234.5678)</paragraph> <paragraph id="par_idm1341603232" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1206743296" role="bascode" localize="false" xml-lang="en-US">Sub ExampleCSTR</paragraph> <paragraph id="par_idm1206742192" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1206741088" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> -<paragraph id="par_idm1206739936" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> -<paragraph id="par_idm1206738784" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> -<paragraph id="par_idm1206737632" role="bascode" localize="false" xml-lang="en-US"> MsgBox CSng(1234.5678)</paragraph> -<paragraph id="par_idm1206736480" role="bascode" localize="false" xml-lang="en-US"> sVar = CStr(1234.5678)</paragraph> -<paragraph id="par_idm1206735328" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar</paragraph> +<paragraph id="par_idm1206741088" role="bascode" localize="false" xml-lang="en-US"> MsgBox CDbl(1234.5678)</paragraph> +<paragraph id="par_idm1206739936" role="bascode" localize="false" xml-lang="en-US"> MsgBox CInt(1234.5678)</paragraph> +<paragraph id="par_idm1206738784" role="bascode" localize="false" xml-lang="en-US"> MsgBox CLng(1234.5678)</paragraph> +<paragraph id="par_idm1206737632" role="bascode" localize="false" xml-lang="en-US"> MsgBox CSng(1234.5678)</paragraph> +<paragraph id="par_idm1206736480" role="bascode" localize="false" xml-lang="en-US"> sVar = CStr(1234.5678)</paragraph> +<paragraph id="par_idm1206735328" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar</paragraph> <paragraph id="par_idm1206734224" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341566960" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> <paragraph id="par_idm1341565728" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1341564496" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefBool</paragraph> -<paragraph id="par_id3151381" role="bascode" xml-lang="en-US"> bOK=TRUE ' bOK is an implicit boolean variable</paragraph> +<paragraph id="par_id3151381" role="bascode" xml-lang="en-US"> bOK=TRUE ' bOK is an implicit boolean variable</paragraph> <paragraph id="par_idm1341561520" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340916800" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1340915568" role="bascode" localize="false" xml-lang="en-US">DefErr e</paragraph> <paragraph id="par_idm1340914336" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefErr</paragraph> -<paragraph id="par_idN105D9" role="bascode" xml-lang="en-US"> eErr=Error ' eErr is an implicit error variable</paragraph> +<paragraph id="par_idN105D9" role="bascode" xml-lang="en-US"> eErr=Error ' eErr is an implicit error variable</paragraph> <paragraph id="par_idm1340911840" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341235056" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1341233824" role="bascode" localize="false" xml-lang="en-US">DefSng s</paragraph> <paragraph id="par_idm1341232592" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefSng</paragraph> -<paragraph id="par_idN105D3" role="bascode" xml-lang="en-US"> sSng=Single ' sSng is an implicit single variable</paragraph> +<paragraph id="par_idN105D3" role="bascode" xml-lang="en-US"> sSng=Single ' sSng is an implicit single variable</paragraph> <paragraph id="par_idm1341230096" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340829152" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1340827920" role="bascode" localize="false" xml-lang="en-US">DefStr s</paragraph> <paragraph id="par_idm1340826688" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefStr</paragraph> -<paragraph id="par_idN105D3" role="bascode" xml-lang="en-US"> sStr=String ' sStr is an implicit string variable</paragraph> +<paragraph id="par_idN105D3" role="bascode" xml-lang="en-US"> sStr=String ' sStr is an implicit string variable</paragraph> <paragraph id="par_idm1341620336" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341299872" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> <paragraph id="par_idm1341298640" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1341297408" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefDate</paragraph> -<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> tDate=Date ' tDate is an implicit date variable</paragraph> +<paragraph id="par_id3152462" role="bascode" xml-lang="en-US"> tDate=Date ' tDate is an implicit date variable</paragraph> <paragraph id="par_idm1341619984" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341568320" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> <paragraph id="par_idm1341567088" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1341565856" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefDBL</paragraph> -<paragraph id="par_id3153144" role="bascode" xml-lang="en-US"> dValue=1.23e43 ' dValue is an implicit double variable type</paragraph> +<paragraph id="par_id3153144" role="bascode" xml-lang="en-US"> dValue=1.23e43 ' dValue is an implicit double variable type</paragraph> <paragraph id="par_idm1341562864" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341566992" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> <paragraph id="par_idm1341565760" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1341564528" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefInt</paragraph> -<paragraph id="par_id3153728" role="bascode" xml-lang="en-US"> iCount=200 ' iCount is an implicit integer variable</paragraph> +<paragraph id="par_id3153728" role="bascode" xml-lang="en-US"> iCount=200 ' iCount is an implicit integer variable</paragraph> <paragraph id="par_idm1341561552" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm871794688" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> <paragraph id="par_idm871793456" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm871792224" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefLng</paragraph> -<paragraph id="par_id3145273" role="bascode" xml-lang="en-US"> lCount=123456789 ' lCount is an implicit long integer variable</paragraph> +<paragraph id="par_id3145273" role="bascode" xml-lang="en-US"> lCount=123456789 ' lCount is an implicit long integer variable</paragraph> <paragraph id="par_idm871789232" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341093184" role="bascode" localize="false" xml-lang="en-US">DefObj o</paragraph> <paragraph id="par_idm1341091952" role="bascode" localize="false" xml-lang="en-US">DefVar v</paragraph> <paragraph id="par_idm1341090720" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDefVar</paragraph> -<paragraph id="par_id3154012" role="bascode" xml-lang="en-US"> vDiv=99 ' vDiv is an implicit variant</paragraph> -<paragraph id="par_id3146121" role="bascode" xml-lang="en-US"> vDiv="Hello world"</paragraph> +<paragraph id="par_id3154012" role="bascode" xml-lang="en-US"> vDiv=99 ' vDiv is an implicit variant</paragraph> +<paragraph id="par_id3146121" role="bascode" xml-lang="en-US"> vDiv="Hello world"</paragraph> <paragraph id="par_idm1341086032" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm871051008" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDim1</paragraph> <paragraph id="par_idm871049776" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> <paragraph id="par_idm871048544" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> -<paragraph id="par_id3154657" role="bascode" xml-lang="en-US"> sVar = "Office"</paragraph> +<paragraph id="par_id3154657" role="bascode" xml-lang="en-US"> sVar = "Office"</paragraph> <paragraph id="par_idm871045600" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm871044368" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm871043120" role="bascode" localize="false" xml-lang="en-US">Sub ExampleDim2</paragraph> @@ -92,14 +92,14 @@ <paragraph id="par_idm871040112" role="bascode" localize="false" xml-lang="en-US">Dim stext(20,2) As String</paragraph> <paragraph id="par_id3153782" role="bascode" xml-lang="en-US">Const sDim As String = " Dimension:"</paragraph> <paragraph id="par_idm871037136" role="bascode" localize="false" xml-lang="en-US">For i = 0 To 20</paragraph> -<paragraph id="par_idm871035904" role="bascode" localize="false" xml-lang="en-US"> For ii = 0 To 2</paragraph> -<paragraph id="par_idm871034672" role="bascode" localize="false" xml-lang="en-US"> stext(i,ii) = str(i) & sDim & str(ii)</paragraph> -<paragraph id="par_idm871033392" role="bascode" localize="false" xml-lang="en-US"> Next ii</paragraph> +<paragraph id="par_idm871035904" role="bascode" localize="false" xml-lang="en-US"> For ii = 0 To 2</paragraph> +<paragraph id="par_idm871034672" role="bascode" localize="false" xml-lang="en-US"> stext(i,ii) = str(i) & sDim & str(ii)</paragraph> +<paragraph id="par_idm871033392" role="bascode" localize="false" xml-lang="en-US"> Next ii</paragraph> <paragraph id="par_idm871032160" role="bascode" localize="false" xml-lang="en-US">Next i</paragraph> <paragraph id="par_idm871030928" role="bascode" localize="false" xml-lang="en-US">For i = 0 To 20</paragraph> -<paragraph id="par_idm871029696" role="bascode" localize="false" xml-lang="en-US"> For ii = 0 To 2</paragraph> -<paragraph id="par_idm871028464" role="bascode" localize="false" xml-lang="en-US"> MsgBox stext(i,ii)</paragraph> -<paragraph id="par_idm871027216" role="bascode" localize="false" xml-lang="en-US"> Next ii</paragraph> +<paragraph id="par_idm871029696" role="bascode" localize="false" xml-lang="en-US"> For ii = 0 To 2</paragraph> +<paragraph id="par_idm871028464" role="bascode" localize="false" xml-lang="en-US"> MsgBox stext(i,ii)</paragraph> +<paragraph id="par_idm871027216" role="bascode" localize="false" xml-lang="en-US"> Next ii</paragraph> <paragraph id="par_idm871025984" role="bascode" localize="false" xml-lang="en-US">Next i</paragraph> <paragraph id="par_idm871024752" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> 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 @@ <paragraph id="par_idm1341052784" role="bascode" localize="false" xml-lang="en-US">Dim iVar() As Integer, iCount As Integer</paragraph> <paragraph id="par_idm1341051520" role="bascode" localize="false" xml-lang="en-US">ReDim iVar(5) As Integer</paragraph> <paragraph id="par_idm1341050272" role="bascode" localize="false" xml-lang="en-US">For iCount = 1 To 5</paragraph> -<paragraph id="par_idm1341049040" role="bascode" localize="false" xml-lang="en-US"> iVar(iCount) = iCount</paragraph> +<paragraph id="par_idm1341049040" role="bascode" localize="false" xml-lang="en-US"> iVar(iCount) = iCount</paragraph> <paragraph id="par_idm1341047792" role="bascode" localize="false" xml-lang="en-US">Next iCount</paragraph> <paragraph id="par_idm1341046560" role="bascode" localize="false" xml-lang="en-US">ReDim iVar(10) As Integer</paragraph> <paragraph id="par_idm1341045312" role="bascode" localize="false" xml-lang="en-US">For iCount = 1 To 10</paragraph> -<paragraph id="par_idm1341044080" role="bascode" localize="false" xml-lang="en-US"> iVar(iCount) = iCount</paragraph> +<paragraph id="par_idm1341044080" role="bascode" localize="false" xml-lang="en-US"> iVar(iCount) = iCount</paragraph> <paragraph id="par_idm1341042832" role="bascode" localize="false" xml-lang="en-US">Next iCount</paragraph> <paragraph id="par_idm1341041600" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> 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 @@ <bascode> <paragraph id="par_idm1341575744" role="bascode" localize="false" xml-lang="en-US">Sub ExampleIsArray</paragraph> <paragraph id="par_idm1341574512" role="bascode" localize="false" xml-lang="en-US">Dim sDatf(10) As String</paragraph> -<paragraph id="par_idm1341573280" role="bascode" localize="false" xml-lang="en-US"> Print isarray(sdatf())</paragraph> +<paragraph id="par_idm1341573280" role="bascode" localize="false" xml-lang="en-US"> Print isarray(sdatf())</paragraph> <paragraph id="par_idm1341572032" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340791552" role="bascode" localize="false" xml-lang="en-US">Sub ExampleIsDate</paragraph> <paragraph id="par_idm1340790320" role="bascode" localize="false" xml-lang="en-US">Dim sDateVar As String</paragraph> -<paragraph id="par_idm1340789088" role="bascode" localize="false" xml-lang="en-US"> sDateVar = "12.12.1997"</paragraph> -<paragraph id="par_id3150869" role="bascode" xml-lang="en-US"> Print IsDate(sDateVar) ' Returns True</paragraph> -<paragraph id="par_idm1340786096" role="bascode" localize="false" xml-lang="en-US"> sDateVar = "12121997"</paragraph> -<paragraph id="par_id3147288" role="bascode" xml-lang="en-US"> Print IsDate(sDateVar) ' Returns False</paragraph> +<paragraph id="par_idm1340789088" role="bascode" localize="false" xml-lang="en-US"> sDateVar = "12.12.1997"</paragraph> +<paragraph id="par_id3150869" role="bascode" xml-lang="en-US"> Print IsDate(sDateVar) ' Returns True</paragraph> +<paragraph id="par_idm1340786096" role="bascode" localize="false" xml-lang="en-US"> sDateVar = "12121997"</paragraph> +<paragraph id="par_id3147288" role="bascode" xml-lang="en-US"> Print IsDate(sDateVar) ' Returns False</paragraph> <paragraph id="par_idm1340783056" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341577824" role="bascode" localize="false" xml-lang="en-US">Sub ExampleIsEmpty</paragraph> <paragraph id="par_idm1341576592" role="bascode" localize="false" xml-lang="en-US">Dim sVar As Variant</paragraph> -<paragraph id="par_idm1341575360" role="bascode" localize="false" xml-lang="en-US"> sVar = Empty</paragraph> -<paragraph id="par_id3154863" role="bascode" xml-lang="en-US"> Print IsEmpty(sVar) ' Returns True</paragraph> +<paragraph id="par_idm1341575360" role="bascode" localize="false" xml-lang="en-US"> sVar = Empty</paragraph> +<paragraph id="par_id3154863" role="bascode" xml-lang="en-US"> Print IsEmpty(sVar) ' Returns True</paragraph> <paragraph id="par_idm1341572400" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340980640" role="bascode" localize="false" xml-lang="en-US">Sub ExampleIsNull</paragraph> <paragraph id="par_idm1340979408" role="bascode" localize="false" xml-lang="en-US">Dim vVar As Variant</paragraph> -<paragraph id="par_idm1340978176" role="bascode" localize="false" xml-lang="en-US"> MsgBox IsNull(vVar)</paragraph> +<paragraph id="par_idm1340978176" role="bascode" localize="false" xml-lang="en-US"> MsgBox IsNull(vVar)</paragraph> <paragraph id="par_idm1340976944" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341575664" role="bascode" localize="false" xml-lang="en-US">Sub ExampleIsNumeric</paragraph> <paragraph id="par_idm1341574432" role="bascode" localize="false" xml-lang="en-US">Dim vVar As Variant</paragraph> -<paragraph id="par_idm1341573200" role="bascode" localize="false" xml-lang="en-US"> vVar = "ABC"</paragraph> -<paragraph id="par_id3147230" role="bascode" xml-lang="en-US"> Print IsNumeric(vVar) ' Returns False</paragraph> -<paragraph id="par_idm1341570224" role="bascode" localize="false" xml-lang="en-US"> vVar = "123"</paragraph> -<paragraph id="par_id3154910" role="bascode" xml-lang="en-US"> Print IsNumeric(vVar) ' Returns True</paragraph> +<paragraph id="par_idm1341573200" role="bascode" localize="false" xml-lang="en-US"> vVar = "ABC"</paragraph> +<paragraph id="par_id3147230" role="bascode" xml-lang="en-US"> Print IsNumeric(vVar) ' Returns False</paragraph> +<paragraph id="par_idm1341570224" role="bascode" localize="false" xml-lang="en-US"> vVar = "123"</paragraph> +<paragraph id="par_id3154910" role="bascode" xml-lang="en-US"> Print IsNumeric(vVar) ' Returns True</paragraph> <paragraph id="par_idm1341567200" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1206770608" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUboundLbound</paragraph> <paragraph id="par_idm1206769504" role="bascode" localize="false" xml-lang="en-US">Dim sVar(10 To 20) As String</paragraph> -<paragraph id="par_idm1206768352" role="bascode" localize="false" xml-lang="en-US"> Print LBound(sVar())</paragraph> -<paragraph id="par_idm1206767200" role="bascode" localize="false" xml-lang="en-US"> Print UBound(sVar())</paragraph> +<paragraph id="par_idm1206768352" role="bascode" localize="false" xml-lang="en-US"> Print LBound(sVar())</paragraph> +<paragraph id="par_idm1206767200" role="bascode" localize="false" xml-lang="en-US"> Print UBound(sVar())</paragraph> <paragraph id="par_idm1206766048" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1206764944" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1206763792" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUboundLbound2</paragraph> <paragraph id="par_idm1206762640" role="bascode" localize="false" xml-lang="en-US">Dim sVar(10 To 20,5 To 70) As String</paragraph> -<paragraph id="par_id3145365" role="bascode" xml-lang="en-US"> Print LBound(sVar()) ' Returns 10</paragraph> -<paragraph id="par_id3150486" role="bascode" xml-lang="en-US"> Print UBound(sVar()) ' Returns 20</paragraph> -<paragraph id="par_id3149665" role="bascode" xml-lang="en-US"> Print LBound(sVar(),2) ' Returns 5</paragraph> -<paragraph id="par_id3159154" role="bascode" xml-lang="en-US"> Print UBound(sVar(),2) ' Returns 70</paragraph> +<paragraph id="par_id3145365" role="bascode" xml-lang="en-US"> Print LBound(sVar()) ' Returns 10</paragraph> +<paragraph id="par_id3150486" role="bascode" xml-lang="en-US"> Print UBound(sVar()) ' Returns 20</paragraph> +<paragraph id="par_id3149665" role="bascode" xml-lang="en-US"> Print LBound(sVar(),2) ' Returns 5</paragraph> +<paragraph id="par_id3159154" role="bascode" xml-lang="en-US"> Print UBound(sVar(),2) ' Returns 70</paragraph> <paragraph id="par_idm1206754912" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341372528" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUboundLbound</paragraph> <paragraph id="par_idm1341371296" role="bascode" localize="false" xml-lang="en-US">Dim sVar(10 To 20) As String</paragraph> -<paragraph id="par_idm1341370048" role="bascode" localize="false" xml-lang="en-US"> Print LBound(sVar())</paragraph> -<paragraph id="par_idm1341368800" role="bascode" localize="false" xml-lang="en-US"> Print UBound(sVar())</paragraph> +<paragraph id="par_idm1341370048" role="bascode" localize="false" xml-lang="en-US"> Print LBound(sVar())</paragraph> +<paragraph id="par_idm1341368800" role="bascode" localize="false" xml-lang="en-US"> Print UBound(sVar())</paragraph> <paragraph id="par_idm1341367552" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341366320" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341365072" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUboundLbound2</paragraph> <paragraph id="par_idm1341363824" role="bascode" localize="false" xml-lang="en-US">Dim sVar(10 To 20,5 To 70) As String</paragraph> -<paragraph id="par_id3152596" role="bascode" xml-lang="en-US"> Print LBound(sVar()) ' Returns 10</paragraph> -<paragraph id="par_id3153138" role="bascode" xml-lang="en-US"> Print UBound(sVar()) ' Returns 20</paragraph> -<paragraph id="par_id3149665" role="bascode" xml-lang="en-US"> Print LBound(sVar(),2) ' Returns 5</paragraph> -<paragraph id="par_id3147214" role="bascode" xml-lang="en-US"> Print UBound(sVar(),2) ' Returns 70</paragraph> +<paragraph id="par_id3152596" role="bascode" xml-lang="en-US"> Print LBound(sVar()) ' Returns 10</paragraph> +<paragraph id="par_id3153138" role="bascode" xml-lang="en-US"> Print UBound(sVar()) ' Returns 20</paragraph> +<paragraph id="par_id3149665" role="bascode" xml-lang="en-US"> Print LBound(sVar(),2) ' Returns 5</paragraph> +<paragraph id="par_id3147214" role="bascode" xml-lang="en-US"> Print UBound(sVar(),2) ' Returns 70</paragraph> <paragraph id="par_idm1341355616" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340853056" role="bascode" localize="false" xml-lang="en-US">Sub ExampleLet</paragraph> <paragraph id="par_idm1340851824" role="bascode" localize="false" xml-lang="en-US">Dim sText As String</paragraph> -<paragraph id="par_idm1340850592" role="bascode" localize="false" xml-lang="en-US"> Let sText = "Las Vegas"</paragraph> -<paragraph id="par_id3152939" role="bascode" xml-lang="en-US"> MsgBox Len(sText) ' returns 9</paragraph> +<paragraph id="par_idm1340850592" role="bascode" localize="false" xml-lang="en-US"> Let sText = "Las Vegas"</paragraph> +<paragraph id="par_id3152939" role="bascode" xml-lang="en-US"> MsgBox Len(sText) ' returns 9</paragraph> <paragraph id="par_idm1340847616" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341310544" role="bascode" localize="false" xml-lang="en-US">Option Base 1</paragraph> <paragraph id="par_idm1341309312" role="bascode" localize="false" xml-lang="en-US">Sub ExampleOptionBase</paragraph> -<paragraph id="par_idm1341308080" role="bascode" localize="false" xml-lang="en-US"> Dim sVar(20) As String</paragraph> -<paragraph id="par_idm1341306832" role="bascode" localize="false" xml-lang="en-US"> MsgBox LBound(sVar())</paragraph> +<paragraph id="par_idm1341308080" role="bascode" localize="false" xml-lang="en-US"> Dim sVar(20) As String</paragraph> +<paragraph id="par_idm1341306832" role="bascode" localize="false" xml-lang="en-US"> MsgBox LBound(sVar())</paragraph> <paragraph id="par_idm1341305584" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340938880" role="bascode" localize="false" xml-lang="en-US">Option Explicit</paragraph> <paragraph id="par_idm1340937648" role="bascode" localize="false" xml-lang="en-US">Sub ExampleExplicit</paragraph> <paragraph id="par_idm1340936416" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1340935056" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> -<paragraph id="par_id3145787" role="bascode" xml-lang="en-US"> For i% = 1 To 10 ' This results in a run-time error</paragraph> -<paragraph id="par_idm1340932080" role="bascode" localize="false" xml-lang="en-US"> Rem</paragraph> -<paragraph id="par_idm1340930848" role="bascode" localize="false" xml-lang="en-US"> Next i%</paragraph> +<paragraph id="par_idm1340935056" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> +<paragraph id="par_id3145787" role="bascode" xml-lang="en-US"> For i% = 1 To 10 ' This results in a run-time error</paragraph> +<paragraph id="par_idm1340932080" role="bascode" localize="false" xml-lang="en-US"> Rem</paragraph> +<paragraph id="par_idm1340930848" role="bascode" localize="false" xml-lang="en-US"> Next i%</paragraph> <paragraph id="par_idm1340929616" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341596288" role="bascode" localize="false" xml-lang="en-US">Public iPublicVar As Integer</paragraph> <paragraph id="par_idm1341595040" role="bascode" localize="false" xml-lang="en-US">Sub ExamplePublic</paragraph> -<paragraph id="par_idm1341593808" role="bascode" localize="false" xml-lang="en-US"> iPublicVar = iPublicVar + 1</paragraph> -<paragraph id="par_idm1341592560" role="bascode" localize="false" xml-lang="en-US"> MsgBox iPublicVar</paragraph> +<paragraph id="par_idm1341593808" role="bascode" localize="false" xml-lang="en-US"> iPublicVar = iPublicVar + 1</paragraph> +<paragraph id="par_idm1341592560" role="bascode" localize="false" xml-lang="en-US"> MsgBox iPublicVar</paragraph> <paragraph id="par_idm1341591328" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341092512" role="bascode" localize="false" xml-lang="en-US">Global iGlobalVar As Integer</paragraph> <paragraph id="par_idm1341091264" role="bascode" localize="false" xml-lang="en-US">Sub ExampleGlobal</paragraph> -<paragraph id="par_idm1341090032" role="bascode" localize="false" xml-lang="en-US"> iGlobalVar = iGlobalVar + 1</paragraph> -<paragraph id="par_idm1341088784" role="bascode" localize="false" xml-lang="en-US"> MsgBox iGlobalVar</paragraph> +<paragraph id="par_idm1341090032" role="bascode" localize="false" xml-lang="en-US"> iGlobalVar = iGlobalVar + 1</paragraph> +<paragraph id="par_idm1341088784" role="bascode" localize="false" xml-lang="en-US"> MsgBox iGlobalVar</paragraph> <paragraph id="par_idm1341087552" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340791536" role="bascode" localize="false" xml-lang="en-US">Sub ExampleStatic</paragraph> <paragraph id="par_idm1340790304" role="bascode" localize="false" xml-lang="en-US">Dim iCount As Integer, iResult As Integer</paragraph> -<paragraph id="par_idm1340789040" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 2</paragraph> -<paragraph id="par_idm1340787808" role="bascode" localize="false" xml-lang="en-US"> iResult = InitVar()</paragraph> -<paragraph id="par_idm1340786560" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> -<paragraph id="par_id3150870" role="bascode" xml-lang="en-US"> MsgBox iResult,0,"The answer is"</paragraph> +<paragraph id="par_idm1340789040" role="bascode" localize="false" xml-lang="en-US"> For iCount = 0 To 2</paragraph> +<paragraph id="par_idm1340787808" role="bascode" localize="false" xml-lang="en-US"> iResult = InitVar()</paragraph> +<paragraph id="par_idm1340786560" role="bascode" localize="false" xml-lang="en-US"> Next iCount</paragraph> +<paragraph id="par_id3150870" role="bascode" xml-lang="en-US"> MsgBox iResult,0,"The answer is"</paragraph> <paragraph id="par_idm1340783600" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340782368" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_id3151115" role="bascode" xml-lang="en-US">' Function for initialization of the static variable</paragraph> <paragraph id="par_idm1340779328" role="bascode" localize="false" xml-lang="en-US">Function InitVar() As Integer</paragraph> -<paragraph id="par_idm1340778080" role="bascode" localize="false" xml-lang="en-US"> Static iInit As Integer</paragraph> -<paragraph id="par_id1057161" role="bascode" xml-lang="en-US"> Const iMinimum As Integer = 40 ' minimum return value of this function</paragraph> -<paragraph id="par_id580462" role="bascode" xml-lang="en-US"> If iInit = 0 Then ' check if initialized</paragraph> -<paragraph id="par_idm1340950464" role="bascode" localize="false" xml-lang="en-US"> iInit = iMinimum</paragraph> -<paragraph id="par_idm1340949216" role="bascode" localize="false" xml-lang="en-US"> Else</paragraph> -<paragraph id="par_idm1340947984" role="bascode" localize="false" xml-lang="en-US"> iInit = iInit + 1</paragraph> -<paragraph id="par_idm1340946736" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> -<paragraph id="par_idm1340945504" role="bascode" localize="false" xml-lang="en-US"> InitVar = iInit</paragraph> +<paragraph id="par_idm1340778080" role="bascode" localize="false" xml-lang="en-US"> Static iInit As Integer</paragraph> +<paragraph id="par_id1057161" role="bascode" xml-lang="en-US"> Const iMinimum As Integer = 40 ' minimum return value of this function</paragraph> +<paragraph id="par_id580462" role="bascode" xml-lang="en-US"> If iInit = 0 Then ' check if initialized</paragraph> +<paragraph id="par_idm1340950464" role="bascode" localize="false" xml-lang="en-US"> iInit = iMinimum</paragraph> +<paragraph id="par_idm1340949216" role="bascode" localize="false" xml-lang="en-US"> Else</paragraph> +<paragraph id="par_idm1340947984" role="bascode" localize="false" xml-lang="en-US"> iInit = iInit + 1</paragraph> +<paragraph id="par_idm1340946736" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1340945504" role="bascode" localize="false" xml-lang="en-US"> InitVar = iInit</paragraph> <paragraph id="par_idm1340944272" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340865072" role="bascode" localize="false" xml-lang="en-US">Dim dVar As Double</paragraph> <paragraph id="par_idm1340863840" role="bascode" localize="false" xml-lang="en-US">Dim bVar As Boolean</paragraph> <paragraph id="par_idm1340862608" role="bascode" localize="false" xml-lang="en-US">Dim lVar As Long</paragraph> -<paragraph id="par_idm1340861376" role="bascode" localize="false" xml-lang="en-US"> MsgBox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_</paragraph> -<paragraph id="par_idm1340860032" role="bascode" localize="false" xml-lang="en-US"> TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_</paragraph> -<paragraph id="par_idm1340858736" role="bascode" localize="false" xml-lang="en-US"> TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_</paragraph> -<paragraph id="par_idm1340857424" role="bascode" localize="false" xml-lang="en-US"> TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_</paragraph> -<paragraph id="par_idm1340856128" role="bascode" localize="false" xml-lang="en-US"> TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_</paragraph> -<paragraph id="par_id3148817" role="bascode" xml-lang="en-US"> TypeName(lVar) & " " & VarType(lVar),0,"Some types In $[officename] Basic"</paragraph> +<paragraph id="par_idm1340861376" role="bascode" localize="false" xml-lang="en-US"> MsgBox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_</paragraph> +<paragraph id="par_idm1340860032" role="bascode" localize="false" xml-lang="en-US"> TypeName(sVar) & " " & VarType(sVar) & Chr(13) &_</paragraph> +<paragraph id="par_idm1340858736" role="bascode" localize="false" xml-lang="en-US"> TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_</paragraph> +<paragraph id="par_idm1340857424" role="bascode" localize="false" xml-lang="en-US"> TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_</paragraph> +<paragraph id="par_idm1340856128" role="bascode" localize="false" xml-lang="en-US"> TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_</paragraph> +<paragraph id="par_id3148817" role="bascode" xml-lang="en-US"> TypeName(lVar) & " " & VarType(lVar),0,"Some types In $[officename] Basic"</paragraph> <paragraph id="par_idm1340852896" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340836336" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSet</paragraph> <paragraph id="par_idm1340835104" role="bascode" localize="false" xml-lang="en-US">Dim oDoc As Object</paragraph> -<paragraph id="par_idm1340833872" role="bascode" localize="false" xml-lang="en-US"> Set oDoc = ActiveWindow</paragraph> -<paragraph id="par_idm1340832624" role="bascode" localize="false" xml-lang="en-US"> Print oDoc.Name</paragraph> +<paragraph id="par_idm1340833872" role="bascode" localize="false" xml-lang="en-US"> Set oDoc = ActiveWindow</paragraph> +<paragraph id="par_idm1340832624" role="bascode" localize="false" xml-lang="en-US"> Print oDoc.Name</paragraph> <paragraph id="par_idm1340831392" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341075248" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUnequal</paragraph> <paragraph id="par_idm1341074016" role="bascode" localize="false" xml-lang="en-US">Dim sFile As String</paragraph> <paragraph id="par_id3154909" role="bascode" xml-lang="en-US">Dim sRoot As String ' Root directory for file in and output</paragraph> -<paragraph id="par_idm1341071024" role="bascode" localize="false" xml-lang="en-US"> sRoot = "c:\"</paragraph> -<paragraph id="par_idm1341069792" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$( sRoot ,22)</paragraph> -<paragraph id="par_idm1341068544" role="bascode" localize="false" xml-lang="en-US"> If sFile <> "" Then</paragraph> -<paragraph id="par_idm1341067296" role="bascode" localize="false" xml-lang="en-US"> Do</paragraph> -<paragraph id="par_idm1341066064" role="bascode" localize="false" xml-lang="en-US"> MsgBox sFile</paragraph> -<paragraph id="par_idm1341064816" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$</paragraph> -<paragraph id="par_idm1341063568" role="bascode" localize="false" xml-lang="en-US"> Loop Until sFile = ""</paragraph> -<paragraph id="par_idm1341062320" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> +<paragraph id="par_idm1341071024" role="bascode" localize="false" xml-lang="en-US"> sRoot = "c:\"</paragraph> +<paragraph id="par_idm1341069792" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$( sRoot ,22)</paragraph> +<paragraph id="par_idm1341068544" role="bascode" localize="false" xml-lang="en-US"> If sFile <> "" Then</paragraph> +<paragraph id="par_idm1341067296" role="bascode" localize="false" xml-lang="en-US"> Do</paragraph> +<paragraph id="par_idm1341066064" role="bascode" localize="false" xml-lang="en-US"> MsgBox sFile</paragraph> +<paragraph id="par_idm1341064816" role="bascode" localize="false" xml-lang="en-US"> sFile = Dir$</paragraph> +<paragraph id="par_idm1341063568" role="bascode" localize="false" xml-lang="en-US"> Loop Until sFile = ""</paragraph> +<paragraph id="par_idm1341062320" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph> <paragraph id="par_idm1341061088" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3159413" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341586960" role="bascode" localize="false" xml-lang="en-US">Sub ExampleASC</paragraph> -<paragraph id="par_id3150792" role="bascode" xml-lang="en-US"> Print ASC("A") ' returns 65</paragraph> -<paragraph id="par_id3148797" role="bascode" xml-lang="en-US"> Print ASC("Z") ' returns 90</paragraph> -<paragraph id="par_id3163800" role="bascode" xml-lang="en-US"> Print ASC("Las Vegas") ' returns 76, since only the first character is taken into account</paragraph> +<paragraph id="par_id3150792" role="bascode" xml-lang="en-US"> Print ASC("A") ' returns 65</paragraph> +<paragraph id="par_id3148797" role="bascode" xml-lang="en-US"> Print ASC("Z") ' returns 90</paragraph> +<paragraph id="par_id3163800" role="bascode" xml-lang="en-US"> Print ASC("Las Vegas") ' returns 76, since only the first character is taken into account</paragraph> <paragraph id="par_idm1341580480" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> 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 @@ <paragraph id="hd_id3154366" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341138080" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChr</paragraph> -<paragraph id="par_id3154909" role="bascode" xml-lang="en-US"> ' This example inserts quotation marks (ASCII value 34) in a string.</paragraph> -<paragraph id="par_id3151380" role="bascode" xml-lang="en-US"> MsgBox "A "+ Chr$(34)+"short" + Chr$(34)+" trip."</paragraph> -<paragraph id="par_id3145174" role="bascode" xml-lang="en-US"> ' The printout appears in the dialog as: A "short" trip.</paragraph> +<paragraph id="par_id3154909" role="bascode" xml-lang="en-US"> ' This example inserts quotation marks (ASCII value 34) in a string.</paragraph> +<paragraph id="par_id3151380" role="bascode" xml-lang="en-US"> MsgBox "A "+ Chr$(34)+"short" + Chr$(34)+" trip."</paragraph> +<paragraph id="par_id3145174" role="bascode" xml-lang="en-US"> ' The printout appears in the dialog as: A "short" trip.</paragraph> <paragraph id="par_idm1341131568" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> 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 @@ <paragraph id="par_idm1341439760" role="bascode" localize="false" xml-lang="en-US">Sub ExampleStr</paragraph> <paragraph id="par_idm1341438528" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Single</paragraph> <paragraph id="par_idm1341437296" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1341436064" role="bascode" localize="false" xml-lang="en-US"> iVar = 123.123</paragraph> -<paragraph id="par_idm1341434832" role="bascode" localize="false" xml-lang="en-US"> sVar = LTrim(Str(iVar))</paragraph> -<paragraph id="par_idm1341433584" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar & chr(13) & Str(iVar)</paragraph> +<paragraph id="par_idm1341436064" role="bascode" localize="false" xml-lang="en-US"> iVar = 123.123</paragraph> +<paragraph id="par_idm1341434832" role="bascode" localize="false" xml-lang="en-US"> sVar = LTrim(Str(iVar))</paragraph> +<paragraph id="par_idm1341433584" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar & chr(13) & Str(iVar)</paragraph> <paragraph id="par_idm1341432272" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3154365" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341084240" role="bascode" localize="false" xml-lang="en-US">Sub ExampleVal</paragraph> -<paragraph id="par_idm1341083008" role="bascode" localize="false" xml-lang="en-US"> MsgBox Val("123.123")</paragraph> -<paragraph id="par_idm1341081760" role="bascode" localize="false" xml-lang="en-US"> MsgBox Val("A123.123")</paragraph> +<paragraph id="par_idm1341083008" role="bascode" localize="false" xml-lang="en-US"> MsgBox Val("123.123")</paragraph> +<paragraph id="par_idm1341081760" role="bascode" localize="false" xml-lang="en-US"> MsgBox Val("A123.123")</paragraph> <paragraph id="par_idm1341080512" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341576672" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSpace</paragraph> <paragraph id="par_idm1341575440" role="bascode" localize="false" xml-lang="en-US">Dim sText As String,sOut As String</paragraph> <paragraph id="par_idm1341574192" role="bascode" localize="false" xml-lang="en-US">Dim iLen As Integer</paragraph> -<paragraph id="par_idm1341572960" role="bascode" localize="false" xml-lang="en-US"> iLen = 10</paragraph> -<paragraph id="par_idm1341571728" role="bascode" localize="false" xml-lang="en-US"> sText = "Las Vegas"</paragraph> -<paragraph id="par_idm1341570496" role="bascode" localize="false" xml-lang="en-US"> sOut = sText & Space(iLen) & sText & Chr(13) &_</paragraph> -<paragraph id="par_idm1341569184" role="bascode" localize="false" xml-lang="en-US"> sText & Space(iLen*2) & sText & Chr(13) &_</paragraph> -<paragraph id="par_idm1341567888" role="bascode" localize="false" xml-lang="en-US"> sText & Space(iLen*4) & sText & Chr(13)</paragraph> -<paragraph id="par_id3154216" role="bascode" xml-lang="en-US"> MsgBox sOut,0,"Info:"</paragraph> +<paragraph id="par_idm1341572960" role="bascode" localize="false" xml-lang="en-US"> iLen = 10</paragraph> +<paragraph id="par_idm1341571728" role="bascode" localize="false" xml-lang="en-US"> sText = "Las Vegas"</paragraph> +<paragraph id="par_idm1341570496" role="bascode" localize="false" xml-lang="en-US"> sOut = sText & Space(iLen) & sText & Chr(13) &_</paragraph> +<paragraph id="par_idm1341569184" role="bascode" localize="false" xml-lang="en-US"> sText & Space(iLen*2) & sText & Chr(13) &_</paragraph> +<paragraph id="par_idm1341567888" role="bascode" localize="false" xml-lang="en-US"> sText & Space(iLen*4) & sText & Chr(13)</paragraph> +<paragraph id="par_id3154216" role="bascode" xml-lang="en-US"> MsgBox sOut,0,"Info:"</paragraph> <paragraph id="par_idm1341564864" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340924160" role="bascode" localize="false" xml-lang="en-US">Sub ExampleString</paragraph> <paragraph id="par_idm1340922928" role="bascode" localize="false" xml-lang="en-US">Dim sText As String</paragraph> -<paragraph id="par_idm1340921696" role="bascode" localize="false" xml-lang="en-US"> sText = String(10,"A")</paragraph> -<paragraph id="par_idm1340920448" role="bascode" localize="false" xml-lang="en-US"> MsgBox sText</paragraph> -<paragraph id="par_idm1340919216" role="bascode" localize="false" xml-lang="en-US"> sText = String(10,65)</paragraph> -<paragraph id="par_idm1340917968" role="bascode" localize="false" xml-lang="en-US"> MsgBox sText</paragraph> +<paragraph id="par_idm1340921696" role="bascode" localize="false" xml-lang="en-US"> sText = String(10,"A")</paragraph> +<paragraph id="par_idm1340920448" role="bascode" localize="false" xml-lang="en-US"> MsgBox sText</paragraph> +<paragraph id="par_idm1340919216" role="bascode" localize="false" xml-lang="en-US"> sText = String(10,65)</paragraph> +<paragraph id="par_idm1340917968" role="bascode" localize="false" xml-lang="en-US"> MsgBox sText</paragraph> <paragraph id="par_idm1340916736" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3149019" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341556320" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFormat</paragraph> -<paragraph id="par_idm1341555088" role="bascode" localize="false" xml-lang="en-US"> MsgBox Format(6328.2, "##,##0.00")</paragraph> -<paragraph id="par_idN107A2" role="bascode" xml-lang="en-US"> ' always use a period as decimal delimiter when you enter numbers in Basic source code.</paragraph> -<paragraph id="par_id3147339" role="bascode" xml-lang="en-US"> ' displays for example 6,328.20 in English locale, 6.328,20 in German locale.</paragraph> +<paragraph id="par_idm1341555088" role="bascode" localize="false" xml-lang="en-US"> MsgBox Format(6328.2, "##,##0.00")</paragraph> +<paragraph id="par_idN107A2" role="bascode" xml-lang="en-US"> ' always use a period as decimal delimiter when you enter numbers in Basic source code.</paragraph> +<paragraph id="par_id3147339" role="bascode" xml-lang="en-US"> ' displays for example 6,328.20 in English locale, 6.328,20 in German locale.</paragraph> <paragraph id="par_idm1341550752" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341103568" role="bascode" localize="false" xml-lang="en-US">Sub ExampleLUCase</paragraph> <paragraph id="par_idm1341102336" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1341101104" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> -<paragraph id="par_id3146121" role="bascode" xml-lang="en-US"> Print LCase(sVar) ' Returns "las vegas"</paragraph> -<paragraph id="par_id3146986" role="bascode" xml-lang="en-US"> Print UCase(sVar) ' Returns "LAS VEGAS"</paragraph> +<paragraph id="par_idm1341101104" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> +<paragraph id="par_id3146121" role="bascode" xml-lang="en-US"> Print LCase(sVar) ' Returns "las vegas"</paragraph> +<paragraph id="par_id3146986" role="bascode" xml-lang="en-US"> Print UCase(sVar) ' Returns "LAS VEGAS"</paragraph> <paragraph id="par_idm1341096336" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1340818096" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUSDate</paragraph> <paragraph id="par_idm1340816864" role="bascode" localize="false" xml-lang="en-US">Dim sInput As String</paragraph> <paragraph id="par_idm1340815632" role="bascode" localize="false" xml-lang="en-US">Dim sUS_date As String</paragraph> -<paragraph id="par_id3150448" role="bascode" xml-lang="en-US"> sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")</paragraph> -<paragraph id="par_idm1340812576" role="bascode" localize="false" xml-lang="en-US"> sUS_date = Mid(sInput, 6, 2)</paragraph> -<paragraph id="par_idm1340811328" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> -<paragraph id="par_idm1340810064" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Right(sInput, 2)</paragraph> -<paragraph id="par_idm1340808800" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> -<paragraph id="par_idm1340807536" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Left(sInput, 4)</paragraph> -<paragraph id="par_idm1340806272" role="bascode" localize="false" xml-lang="en-US"> MsgBox sUS_date</paragraph> +<paragraph id="par_id3150448" role="bascode" xml-lang="en-US"> sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")</paragraph> +<paragraph id="par_idm1340812576" role="bascode" localize="false" xml-lang="en-US"> sUS_date = Mid(sInput, 6, 2)</paragraph> +<paragraph id="par_idm1340811328" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> +<paragraph id="par_idm1340810064" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Right(sInput, 2)</paragraph> +<paragraph id="par_idm1340808800" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> +<paragraph id="par_idm1340807536" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Left(sInput, 4)</paragraph> +<paragraph id="par_idm1340806272" role="bascode" localize="false" xml-lang="en-US"> MsgBox sUS_date</paragraph> <paragraph id="par_idm1340805040" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341571792" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRLSet</paragraph> <paragraph id="par_idm1341570560" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> <paragraph id="par_idm1341569328" role="bascode" localize="false" xml-lang="en-US">Dim sExpr As String</paragraph> -<paragraph id="par_idm1341568096" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> -<paragraph id="par_idm1341566848" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> -<paragraph id="par_id3152940" role="bascode" xml-lang="en-US"> ' Align "SBX" within the 40-character reference string</paragraph> -<paragraph id="par_id3148647" role="bascode" xml-lang="en-US"> ' Replace asterisks with spaces</paragraph> -<paragraph id="par_idm1341562080" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341560848" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> -<paragraph id="par_idm1341559600" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> -<paragraph id="par_idm1341558352" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123457896"</paragraph> -<paragraph id="par_idm1341557120" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341555888" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> -<paragraph id="par_idm1341554640" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> -<paragraph id="par_idm1341553392" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> -<paragraph id="par_id3151075" role="bascode" xml-lang="en-US"> ' Left-align "SBX" within the 40-character reference string</paragraph> -<paragraph id="par_idm1341550400" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341549168" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> -<paragraph id="par_idm1341547920" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> -<paragraph id="par_idm1341546672" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123456789"</paragraph> -<paragraph id="par_idm1341545440" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341544208" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341568096" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> +<paragraph id="par_idm1341566848" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> +<paragraph id="par_id3152940" role="bascode" xml-lang="en-US"> ' Align "SBX" within the 40-character reference string</paragraph> +<paragraph id="par_id3148647" role="bascode" xml-lang="en-US"> ' Replace asterisks with spaces</paragraph> +<paragraph id="par_idm1341562080" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341560848" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341559600" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> +<paragraph id="par_idm1341558352" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123457896"</paragraph> +<paragraph id="par_idm1341557120" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341555888" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341554640" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> +<paragraph id="par_idm1341553392" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> +<paragraph id="par_id3151075" role="bascode" xml-lang="en-US"> ' Left-align "SBX" within the 40-character reference string</paragraph> +<paragraph id="par_idm1341550400" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341549168" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341547920" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> +<paragraph id="par_idm1341546672" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123456789"</paragraph> +<paragraph id="par_idm1341545440" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341544208" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> <paragraph id="par_idm1341542960" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340839888" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSpaces</paragraph> <paragraph id="par_idm1340838656" role="bascode" localize="false" xml-lang="en-US">Dim sText2 As String,sText As String,sOut As String</paragraph> -<paragraph id="par_idm1340837392" role="bascode" localize="false" xml-lang="en-US"> sText2 = " <*Las Vegas*> "</paragraph> -<paragraph id="par_idm1340836144" role="bascode" localize="false" xml-lang="en-US"> sOut = "'"+sText2 +"'"+ Chr(13)</paragraph> -<paragraph id="par_idm1340834896" role="bascode" localize="false" xml-lang="en-US"> sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "</paragraph> -<paragraph id="par_idm1340833600" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut + "'"+sText +"'" + Chr(13)</paragraph> -<paragraph id="par_idm1340832336" role="bascode" localize="false" xml-lang="en-US"> sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"</paragraph> -<paragraph id="par_idm1340831040" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'" + Chr(13)</paragraph> -<paragraph id="par_idm1340829776" role="bascode" localize="false" xml-lang="en-US"> sText = Trim(sText2) ' sText = "<*Las Vegas*>"</paragraph> -<paragraph id="par_idm1340828480" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'"</paragraph> -<paragraph id="par_idm1340827232" role="bascode" localize="false" xml-lang="en-US"> MsgBox sOut</paragraph> +<paragraph id="par_idm1340837392" role="bascode" localize="false" xml-lang="en-US"> sText2 = " <*Las Vegas*> "</paragraph> +<paragraph id="par_idm1340836144" role="bascode" localize="false" xml-lang="en-US"> sOut = "'"+sText2 +"'"+ Chr(13)</paragraph> +<paragraph id="par_idm1340834896" role="bascode" localize="false" xml-lang="en-US"> sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "</paragraph> +<paragraph id="par_idm1340833600" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut + "'"+sText +"'" + Chr(13)</paragraph> +<paragraph id="par_idm1340832336" role="bascode" localize="false" xml-lang="en-US"> sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"</paragraph> +<paragraph id="par_idm1340831040" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'" + Chr(13)</paragraph> +<paragraph id="par_idm1340829776" role="bascode" localize="false" xml-lang="en-US"> sText = Trim(sText2) ' sText = "<*Las Vegas*>"</paragraph> +<paragraph id="par_idm1340828480" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'"</paragraph> +<paragraph id="par_idm1340827232" role="bascode" localize="false" xml-lang="en-US"> MsgBox sOut</paragraph> <paragraph id="par_idm1340826000" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341563264" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUSDate</paragraph> <paragraph id="par_idm1341562032" role="bascode" localize="false" xml-lang="en-US">Dim sInput As String</paragraph> <paragraph id="par_idm1341560800" role="bascode" localize="false" xml-lang="en-US">Dim sUS_date As String</paragraph> -<paragraph id="par_id3153189" role="bascode" xml-lang="en-US"> sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")</paragraph> -<paragraph id="par_idm1341557792" role="bascode" localize="false" xml-lang="en-US"> sUS_date = Mid(sInput, 6, 2)</paragraph> -<paragraph id="par_idm1341556544" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> -<paragraph id="par_idm1341555280" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Right(sInput, 2)</paragraph> -<paragraph id="par_idm1341554016" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> -<paragraph id="par_idm1341552752" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Left(sInput, 4)</paragraph> -<paragraph id="par_idm1341551488" role="bascode" localize="false" xml-lang="en-US"> MsgBox sUS_date</paragraph> +<paragraph id="par_id3153189" role="bascode" xml-lang="en-US"> sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")</paragraph> +<paragraph id="par_idm1341557792" role="bascode" localize="false" xml-lang="en-US"> sUS_date = Mid(sInput, 6, 2)</paragraph> +<paragraph id="par_idm1341556544" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> +<paragraph id="par_idm1341555280" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Right(sInput, 2)</paragraph> +<paragraph id="par_idm1341554016" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> +<paragraph id="par_idm1341552752" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Left(sInput, 4)</paragraph> +<paragraph id="par_idm1341551488" role="bascode" localize="false" xml-lang="en-US"> MsgBox sUS_date</paragraph> <paragraph id="par_idm1341550256" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341027360" role="bascode" localize="false" xml-lang="en-US">Sub ExampleUSDate</paragraph> <paragraph id="par_idm1341026128" role="bascode" localize="false" xml-lang="en-US">Dim sInput As String</paragraph> <paragraph id="par_idm1341024896" role="bascode" localize="false" xml-lang="en-US">Dim sUS_date As String</paragraph> -<paragraph id="par_id3159252" role="bascode" xml-lang="en-US"> sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")</paragraph> -<paragraph id="par_idm1341021888" role="bascode" localize="false" xml-lang="en-US"> sUS_date = Mid(sInput, 6, 2)</paragraph> -<paragraph id="par_idm1341020640" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> -<paragraph id="par_idm1341019376" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Right(sInput, 2)</paragraph> -<paragraph id="par_idm1341018112" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> -<paragraph id="par_idm1341016848" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Left(sInput, 4)</paragraph> -<paragraph id="par_idm1341015584" role="bascode" localize="false" xml-lang="en-US"> MsgBox sUS_date</paragraph> +<paragraph id="par_id3159252" role="bascode" xml-lang="en-US"> sInput = InputBox("Please input a date in the international format 'YYYY-MM-DD'")</paragraph> +<paragraph id="par_idm1341021888" role="bascode" localize="false" xml-lang="en-US"> sUS_date = Mid(sInput, 6, 2)</paragraph> +<paragraph id="par_idm1341020640" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> +<paragraph id="par_idm1341019376" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Right(sInput, 2)</paragraph> +<paragraph id="par_idm1341018112" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & "/"</paragraph> +<paragraph id="par_idm1341016848" role="bascode" localize="false" xml-lang="en-US"> sUS_date = sUS_date & Left(sInput, 4)</paragraph> +<paragraph id="par_idm1341015584" role="bascode" localize="false" xml-lang="en-US"> MsgBox sUS_date</paragraph> <paragraph id="par_idm1341014352" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341567472" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRLSet</paragraph> <paragraph id="par_idm1341566240" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> <paragraph id="par_idm1341565008" role="bascode" localize="false" xml-lang="en-US">Dim sExpr As String</paragraph> -<paragraph id="par_idm1341563776" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> -<paragraph id="par_idm1341562528" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> -<paragraph id="par_id3155856" role="bascode" xml-lang="en-US"> ' Right-align "SBX" in a 40-character string</paragraph> -<paragraph id="par_id3152577" role="bascode" xml-lang="en-US"> ' Replace asterisks with spaces</paragraph> -<paragraph id="par_idm1341557824" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341556592" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> -<paragraph id="par_idm1341555344" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> -<paragraph id="par_idm1341554096" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123457896"</paragraph> -<paragraph id="par_idm1341552864" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341551632" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> -<paragraph id="par_idm1341550384" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> -<paragraph id="par_idm1341549136" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> -<paragraph id="par_id3145801" role="bascode" xml-lang="en-US"> ' Left-align "SBX" in a 40-character string</paragraph> -<paragraph id="par_idm1341546160" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341544928" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> -<paragraph id="par_idm1341543680" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> -<paragraph id="par_idm1341542432" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123456789"</paragraph> -<paragraph id="par_idm1341541200" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> -<paragraph id="par_idm1341539968" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341563776" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> +<paragraph id="par_idm1341562528" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> +<paragraph id="par_id3155856" role="bascode" xml-lang="en-US"> ' Right-align "SBX" in a 40-character string</paragraph> +<paragraph id="par_id3152577" role="bascode" xml-lang="en-US"> ' Replace asterisks with spaces</paragraph> +<paragraph id="par_idm1341557824" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341556592" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341555344" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> +<paragraph id="par_idm1341554096" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123457896"</paragraph> +<paragraph id="par_idm1341552864" role="bascode" localize="false" xml-lang="en-US"> RSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341551632" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341550384" role="bascode" localize="false" xml-lang="en-US"> sVar = String(40,"*")</paragraph> +<paragraph id="par_idm1341549136" role="bascode" localize="false" xml-lang="en-US"> sExpr = "SBX"</paragraph> +<paragraph id="par_id3145801" role="bascode" xml-lang="en-US"> ' Left-align "SBX" in a 40-character string</paragraph> +<paragraph id="par_idm1341546160" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341544928" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> +<paragraph id="par_idm1341543680" role="bascode" localize="false" xml-lang="en-US"> sVar = String(5,"*")</paragraph> +<paragraph id="par_idm1341542432" role="bascode" localize="false" xml-lang="en-US"> sExpr = "123456789"</paragraph> +<paragraph id="par_idm1341541200" role="bascode" localize="false" xml-lang="en-US"> LSet sVar = sExpr</paragraph> +<paragraph id="par_idm1341539968" role="bascode" localize="false" xml-lang="en-US"> Print ">"; sVar; "<"</paragraph> <paragraph id="par_idm1341538720" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341574144" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSpaces</paragraph> <paragraph id="par_idm1341572912" role="bascode" localize="false" xml-lang="en-US">Dim sText2 As String,sText As String,sOut As String</paragraph> -<paragraph id="par_idm1341571648" role="bascode" localize="false" xml-lang="en-US"> sText2 = " <*Las Vegas*> "</paragraph> -<paragraph id="par_idm1341570400" role="bascode" localize="false" xml-lang="en-US"> sOut = "'"+sText2 +"'"+ Chr(13)</paragraph> -<paragraph id="par_idm1341569152" role="bascode" localize="false" xml-lang="en-US"> sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "</paragraph> -<paragraph id="par_idm1341567856" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut + "'"+sText +"'" + Chr(13)</paragraph> -<paragraph id="par_idm1341566592" role="bascode" localize="false" xml-lang="en-US"> sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"</paragraph> -<paragraph id="par_idm1341565296" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'" + Chr(13)</paragraph> -<paragraph id="par_idm1341564032" role="bascode" localize="false" xml-lang="en-US"> sText = Trim(sText2) ' sText = "<*Las Vegas*>"</paragraph> -<paragraph id="par_idm1341562736" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'"</paragraph> -<paragraph id="par_idm1341561488" role="bascode" localize="false" xml-lang="en-US"> MsgBox sOut</paragraph> +<paragraph id="par_idm1341571648" role="bascode" localize="false" xml-lang="en-US"> sText2 = " <*Las Vegas*> "</paragraph> +<paragraph id="par_idm1341570400" role="bascode" localize="false" xml-lang="en-US"> sOut = "'"+sText2 +"'"+ Chr(13)</paragraph> +<paragraph id="par_idm1341569152" role="bascode" localize="false" xml-lang="en-US"> sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "</paragraph> +<paragraph id="par_idm1341567856" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut + "'"+sText +"'" + Chr(13)</paragraph> +<paragraph id="par_idm1341566592" role="bascode" localize="false" xml-lang="en-US"> sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"</paragraph> +<paragraph id="par_idm1341565296" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'" + Chr(13)</paragraph> +<paragraph id="par_idm1341564032" role="bascode" localize="false" xml-lang="en-US"> sText = Trim(sText2) ' sText = "<*Las Vegas*>"</paragraph> +<paragraph id="par_idm1341562736" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'"</paragraph> +<paragraph id="par_idm1341561488" role="bascode" localize="false" xml-lang="en-US"> MsgBox sOut</paragraph> <paragraph id="par_idm1341560256" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1340878864" role="bascode" localize="false" xml-lang="en-US">Sub ExampleLUCase</paragraph> <paragraph id="par_idm1340877632" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1340876400" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> -<paragraph id="par_id3149204" role="bascode" xml-lang="en-US"> Print LCase(sVar) ' returns "las vegas"</paragraph> -<paragraph id="par_id3156280" role="bascode" xml-lang="en-US"> Print UCase(sVar) ' returns "LAS VEGAS"</paragraph> +<paragraph id="par_idm1340876400" role="bascode" localize="false" xml-lang="en-US"> sVar = "Las Vegas"</paragraph> +<paragraph id="par_id3149204" role="bascode" xml-lang="en-US"> Print LCase(sVar) ' returns "las vegas"</paragraph> +<paragraph id="par_id3156280" role="bascode" xml-lang="en-US"> Print UCase(sVar) ' returns "LAS VEGAS"</paragraph> <paragraph id="par_idm1340871632" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341576784" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSpaces</paragraph> <paragraph id="par_idm1341575552" role="bascode" localize="false" xml-lang="en-US">Dim sText2 As String,sText As String,sOut As String</paragraph> -<paragraph id="par_idm1341574288" role="bascode" localize="false" xml-lang="en-US"> sText2 = " <*Las Vegas*> "</paragraph> -<paragraph id="par_idm1341573040" role="bascode" localize="false" xml-lang="en-US"> sOut = "'"+sText2 +"'"+ Chr(13)</paragraph> -<paragraph id="par_idm1341571792" role="bascode" localize="false" xml-lang="en-US"> sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "</paragraph> -<paragraph id="par_idm1341570496" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut + "'"+sText +"'" + Chr(13)</paragraph> -<paragraph id="par_idm1341569232" role="bascode" localize="false" xml-lang="en-US"> sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"</paragraph> -<paragraph id="par_idm1341567936" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'" + Chr(13)</paragraph> -<paragraph id="par_idm1341566672" role="bascode" localize="false" xml-lang="en-US"> sText = Trim(sText2) ' sText = "<*Las Vegas*>"</paragraph> -<paragraph id="par_idm1341565376" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'"</paragraph> -<paragraph id="par_idm1341564128" role="bascode" localize="false" xml-lang="en-US"> MsgBox sOut</paragraph> +<paragraph id="par_idm1341574288" role="bascode" localize="false" xml-lang="en-US"> sText2 = " <*Las Vegas*> "</paragraph> +<paragraph id="par_idm1341573040" role="bascode" localize="false" xml-lang="en-US"> sOut = "'"+sText2 +"'"+ Chr(13)</paragraph> +<paragraph id="par_idm1341571792" role="bascode" localize="false" xml-lang="en-US"> sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "</paragraph> +<paragraph id="par_idm1341570496" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut + "'"+sText +"'" + Chr(13)</paragraph> +<paragraph id="par_idm1341569232" role="bascode" localize="false" xml-lang="en-US"> sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"</paragraph> +<paragraph id="par_idm1341567936" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'" + Chr(13)</paragraph> +<paragraph id="par_idm1341566672" role="bascode" localize="false" xml-lang="en-US"> sText = Trim(sText2) ' sText = "<*Las Vegas*>"</paragraph> +<paragraph id="par_idm1341565376" role="bascode" localize="false" xml-lang="en-US"> sOut = sOut +"'"+ sText +"'"</paragraph> +<paragraph id="par_idm1341564128" role="bascode" localize="false" xml-lang="en-US"> MsgBox sOut</paragraph> <paragraph id="par_idm1341562896" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341285008" role="bascode" localize="false" xml-lang="en-US">Dim a(3)</paragraph> <paragraph id="par_idm1341283776" role="bascode" localize="false" xml-lang="en-US">Sub main()</paragraph> -<paragraph id="par_idm1341282544" role="bascode" localize="false" xml-lang="en-US"> a(0) = "ABCDE"</paragraph> -<paragraph id="par_idm1341281312" role="bascode" localize="false" xml-lang="en-US"> a(1) = 42</paragraph> -<paragraph id="par_idm1341280080" role="bascode" localize="false" xml-lang="en-US"> a(2) = "MN"</paragraph> -<paragraph id="par_idm1341278848" role="bascode" localize="false" xml-lang="en-US"> a(3) = "X Y Z"</paragraph> -<paragraph id="par_idm1341277616" role="bascode" localize="false" xml-lang="en-US"> JStr = Join1()</paragraph> -<paragraph id="par_idm1341276384" role="bascode" localize="false" xml-lang="en-US"> Call Show(JStr, Split1(JStr))</paragraph> -<paragraph id="par_idm1341275136" role="bascode" localize="false" xml-lang="en-US"> JStr = Join2()</paragraph> -<paragraph id="par_idm1341273904" role="bascode" localize="false" xml-lang="en-US"> Call Show(JStr, Split1(JStr))</paragraph> -<paragraph id="par_idm1341272656" role="bascode" localize="false" xml-lang="en-US"> JStr = Join3()</paragraph> -<paragraph id="par_idm1341271424" role="bascode" localize="false" xml-lang="en-US"> Call Show(JStr, Split1(JStr))</paragraph> +<paragraph id="par_idm1341282544" role="bascode" localize="false" xml-lang="en-US"> a(0) = "ABCDE"</paragraph> +<paragraph id="par_idm1341281312" role="bascode" localize="false" xml-lang="en-US"> a(1) = 42</paragraph> +<paragraph id="par_idm1341280080" role="bascode" localize="false" xml-lang="en-US"> a(2) = "MN"</paragraph> +<paragraph id="par_idm1341278848" role="bascode" localize="false" xml-lang="en-US"> a(3) = "X Y Z"</paragraph> +<paragraph id="par_idm1341277616" role="bascode" localize="false" xml-lang="en-US"> JStr = Join1()</paragraph> +<paragraph id="par_idm1341276384" role="bascode" localize="false" xml-lang="en-US"> Call Show(JStr, Split1(JStr))</paragraph> +<paragraph id="par_idm1341275136" role="bascode" localize="false" xml-lang="en-US"> JStr = Join2()</paragraph> +<paragraph id="par_idm1341273904" role="bascode" localize="false" xml-lang="en-US"> Call Show(JStr, Split1(JStr))</paragraph> +<paragraph id="par_idm1341272656" role="bascode" localize="false" xml-lang="en-US"> JStr = Join3()</paragraph> +<paragraph id="par_idm1341271424" role="bascode" localize="false" xml-lang="en-US"> Call Show(JStr, Split1(JStr))</paragraph> <paragraph id="par_idm1341270176" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1341268944" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341267696" role="bascode" localize="false" xml-lang="en-US">Function Join1()</paragraph> -<paragraph id="par_idm1341266464" role="bascode" localize="false" xml-lang="en-US"> Join1 = Join(a(), "abc")</paragraph> +<paragraph id="par_idm1341266464" role="bascode" localize="false" xml-lang="en-US"> Join1 = Join(a(), "abc")</paragraph> <paragraph id="par_idm1341265216" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> <paragraph id="par_idm1341263984" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341262784" role="bascode" localize="false" xml-lang="en-US">Function Join2()</paragraph> -<paragraph id="par_idm1341261552" role="bascode" localize="false" xml-lang="en-US"> Join2 = Join(a(), ",")</paragraph> +<paragraph id="par_idm1341261552" role="bascode" localize="false" xml-lang="en-US"> Join2 = Join(a(), ",")</paragraph> <paragraph id="par_idm1341260304" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> <paragraph id="par_idm1341259072" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341257872" role="bascode" localize="false" xml-lang="en-US">Function Join3()</paragraph> -<paragraph id="par_idm1341256640" role="bascode" localize="false" xml-lang="en-US"> Join3 = Join(a())</paragraph> +<paragraph id="par_idm1341256640" role="bascode" localize="false" xml-lang="en-US"> Join3 = Join(a())</paragraph> <paragraph id="par_idm1341255408" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> <paragraph id="par_idm1341254176" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341252976" role="bascode" localize="false" xml-lang="en-US">Function Split1(aStr)</paragraph> -<paragraph id="par_idm1341251744" role="bascode" localize="false" xml-lang="en-US"> Split1 = Split(aStr, "D")</paragraph> +<paragraph id="par_idm1341251744" role="bascode" localize="false" xml-lang="en-US"> Split1 = Split(aStr, "D")</paragraph> <paragraph id="par_idm1341250496" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> <paragraph id="par_idm1341249264" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341248064" role="bascode" localize="false" xml-lang="en-US">Sub Show(JoinStr, TheArray)</paragraph> -<paragraph id="par_idm1341246816" role="bascode" localize="false" xml-lang="en-US"> l = LBound(TheArray)</paragraph> -<paragraph id="par_idm1341245568" role="bascode" localize="false" xml-lang="en-US"> u = UBound(TheArray)</paragraph> -<paragraph id="par_idm1341244320" role="bascode" localize="false" xml-lang="en-US"> total$ = "=============================" + Chr$(13) + JoinStr + Chr$(13) + Chr$(13)</paragraph> -<paragraph id="par_idm1341243024" role="bascode" localize="false" xml-lang="en-US"> For i = l To u</paragraph> -<paragraph id="par_idm1341241792" role="bascode" localize="false" xml-lang="en-US"> total$ = total$ + TheArray(i) + Str(Len(TheArray(i))) + Chr$(13)</paragraph> -<paragraph id="par_idm1341240496" role="bascode" localize="false" xml-lang="en-US"> Next i</paragraph> -<paragraph id="par_idm1341239264" role="bascode" localize="false" xml-lang="en-US"> MsgBox total$</paragraph> +<paragraph id="par_idm1341246816" role="bascode" localize="false" xml-lang="en-US"> l = LBound(TheArray)</paragraph> +<paragraph id="par_idm1341245568" role="bascode" localize="false" xml-lang="en-US"> u = UBound(TheArray)</paragraph> +<paragraph id="par_idm1341244320" role="bascode" localize="false" xml-lang="en-US"> total$ = "=============================" + Chr$(13) + JoinStr + Chr$(13) + Chr$(13)</paragraph> +<paragraph id="par_idm1341243024" role="bascode" localize="false" xml-lang="en-US"> For i = l To u</paragraph> +<paragraph id="par_idm1341241792" role="bascode" localize="false" xml-lang="en-US"> total$ = total$ + TheArray(i) + Str(Len(TheArray(i))) + Chr$(13)</paragraph> +<paragraph id="par_idm1341240496" role="bascode" localize="false" xml-lang="en-US"> Next i</paragraph> +<paragraph id="par_idm1341239264" role="bascode" localize="false" xml-lang="en-US"> MsgBox total$</paragraph> <paragraph id="par_idm1341238032" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </section> 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 @@ <paragraph id="par_idm1341612352" role="bascode" localize="false" xml-lang="en-US">Sub ExamplePosition</paragraph> <paragraph id="par_idm1341611120" role="bascode" localize="false" xml-lang="en-US">Dim sInput As String</paragraph> <paragraph id="par_idm1341609888" role="bascode" localize="false" xml-lang="en-US">Dim iPos As Integer</paragraph> -<paragraph id="par_id3144760" role="bascode" xml-lang="en-US"> sInput = "Office"</paragraph> -<paragraph id="par_id3154125" role="bascode" xml-lang="en-US"> iPos = Instr(sInput,"c")</paragraph> -<paragraph id="par_idm1341605120" role="bascode" localize="false" xml-lang="en-US"> Print iPos</paragraph> +<paragraph id="par_id3144760" role="bascode" xml-lang="en-US"> sInput = "Office"</paragraph> +<paragraph id="par_id3154125" role="bascode" xml-lang="en-US"> iPos = Instr(sInput,"c")</paragraph> +<paragraph id="par_idm1341605120" role="bascode" localize="false" xml-lang="en-US"> Print iPos</paragraph> <paragraph id="par_idm1341603888" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idm1341100656" role="bascode" localize="false" xml-lang="en-US">Sub ExampleStrComp</paragraph> <paragraph id="par_idm1341099424" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Single</paragraph> <paragraph id="par_idm1341098192" role="bascode" localize="false" xml-lang="en-US">Dim sVar As String</paragraph> -<paragraph id="par_idm1341096960" role="bascode" localize="false" xml-lang="en-US"> iVar = 123.123</paragraph> -<paragraph id="par_idm1341095728" role="bascode" localize="false" xml-lang="en-US"> sVar = Str$(iVar)</paragraph> -<paragraph id="par_idm1341094496" role="bascode" localize="false" xml-lang="en-US"> MsgBox strcomp(sVar , Str$(iVar),1)</paragraph> +<paragraph id="par_idm1341096960" role="bascode" localize="false" xml-lang="en-US"> iVar = 123.123</paragraph> +<paragraph id="par_idm1341095728" role="bascode" localize="false" xml-lang="en-US"> sVar = Str$(iVar)</paragraph> +<paragraph id="par_idm1341094496" role="bascode" localize="false" xml-lang="en-US"> MsgBox strcomp(sVar , Str$(iVar),1)</paragraph> <paragraph id="par_idm1341093248" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3154270" role="heading" level="2" xml-lang="en-US">Example</paragraph> <bascode> <paragraph id="par_idm1341273680" role="bascode" localize="false" xml-lang="en-US">Sub ExampleShellForWin</paragraph> -<paragraph id="par_idm1341272448" role="bascode" localize="false" xml-lang="en-US"> Shell("c:\windows\calc.exe",2)</paragraph> +<paragraph id="par_idm1341272448" role="bascode" localize="false" xml-lang="en-US"> Shell("c:\windows\calc.exe",2)</paragraph> <paragraph id="par_idm1341271200" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341325552" role="bascode" localize="false" xml-lang="en-US">Sub ExampleWait</paragraph> <paragraph id="par_idm1341324320" role="bascode" localize="false" xml-lang="en-US">Dim lTick As Long</paragraph> -<paragraph id="par_idm1341323088" role="bascode" localize="false" xml-lang="en-US"> lTick = GetSystemTicks()</paragraph> -<paragraph id="par_idm1341321840" role="bascode" localize="false" xml-lang="en-US"> Wait 2000</paragraph> -<paragraph id="par_idm1341320608" role="bascode" localize="false" xml-lang="en-US"> lTick = (GetSystemTicks() - lTick)</paragraph> -<paragraph id="par_id3154938" role="bascode" xml-lang="en-US"> MsgBox "" & lTick & " Ticks" ,0,"The pause lasted"</paragraph> +<paragraph id="par_idm1341323088" role="bascode" localize="false" xml-lang="en-US"> lTick = GetSystemTicks()</paragraph> +<paragraph id="par_idm1341321840" role="bascode" localize="false" xml-lang="en-US"> Wait 2000</paragraph> +<paragraph id="par_idm1341320608" role="bascode" localize="false" xml-lang="en-US"> lTick = (GetSystemTicks() - lTick)</paragraph> +<paragraph id="par_id3154938" role="bascode" xml-lang="en-US"> MsgBox "" & lTick & " Ticks" ,0,"The pause lasted"</paragraph> <paragraph id="par_idm1340848064" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341576752" role="bascode" localize="false" xml-lang="en-US">Sub ExampleEnviron</paragraph> <paragraph id="par_idm1341575520" role="bascode" localize="false" xml-lang="en-US">Dim sTemp As String</paragraph> -<paragraph id="par_idm1341574288" role="bascode" localize="false" xml-lang="en-US"> sTemp=Environ ("TEMP")</paragraph> -<paragraph id="par_idm1341573040" role="bascode" localize="false" xml-lang="en-US"> If sTemp = "" Then sTemp=Environ("TMP")</paragraph> -<paragraph id="par_id3145419" role="bascode" xml-lang="en-US"> MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:"</paragraph> +<paragraph id="par_idm1341574288" role="bascode" localize="false" xml-lang="en-US"> sTemp=Environ ("TEMP")</paragraph> +<paragraph id="par_idm1341573040" role="bascode" localize="false" xml-lang="en-US"> If sTemp = "" Then sTemp=Environ("TMP")</paragraph> +<paragraph id="par_id3145419" role="bascode" xml-lang="en-US"> MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:"</paragraph> <paragraph id="par_idm1341569888" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <bascode> <paragraph id="par_idm1341118496" role="bascode" localize="false" xml-lang="en-US">Sub ExampleGetSolarVersion</paragraph> <paragraph id="par_idm1341117248" role="bascode" localize="false" xml-lang="en-US">Dim sSep As String</paragraph> -<paragraph id="par_idm1341116016" role="bascode" localize="false" xml-lang="en-US"> sSep = GetSolarVersion</paragraph> -<paragraph id="par_id3148947" role="bascode" xml-lang="en-US"> MsgBox sSep,64,"Version number of the solar technology"</paragraph> +<paragraph id="par_idm1341116016" role="bascode" localize="false" xml-lang="en-US"> sSep = GetSolarVersion</paragraph> +<paragraph id="par_id3148947" role="bascode" xml-lang="en-US"> MsgBox sSep,64,"Version number of the solar technology"</paragraph> <paragraph id="par_idm1341113008" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3159176" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341056448" role="bascode" localize="false" xml-lang="en-US">Sub ExamplePixelTwips</paragraph> -<paragraph id="par_id3153061" role="bascode" xml-lang="en-US"> MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size"</paragraph> +<paragraph id="par_id3153061" role="bascode" xml-lang="en-US"> MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size"</paragraph> <paragraph id="par_idm1341053376" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="hd_id3149235" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1340758544" role="bascode" localize="false" xml-lang="en-US">Sub ExamplePixelTwips</paragraph> -<paragraph id="par_id3154142" role="bascode" xml-lang="en-US"> MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size"</paragraph> +<paragraph id="par_id3154142" role="bascode" xml-lang="en-US"> MsgBox "" & TwipsPerPixelX() & " Twips * " & TwipsPerPixelY() & " Twips",0,"Pixel size"</paragraph> <paragraph id="par_idm1340755472" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idN10625" role="paragraph" xml-lang="en-US">The following code uses a service to open a file open dialog:</paragraph> <bascode> <paragraph id="par_idm1206777616" role="bascode" localize="false" xml-lang="en-US">Sub Main</paragraph> -<paragraph id="par_idN1062B" role="bascode" xml-lang="en-US"> fName = FileOpenDialog ("Please select a file")</paragraph> -<paragraph id="par_idN10630" role="bascode" xml-lang="en-US"> Print "file chosen: "+fName</paragraph> +<paragraph id="par_idN1062B" role="bascode" xml-lang="en-US"> fName = FileOpenDialog ("Please select a file")</paragraph> +<paragraph id="par_idN10630" role="bascode" xml-lang="en-US"> Print "file chosen: "+fName</paragraph> <paragraph id="par_idm1206774256" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1206773152" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1206772000" role="bascode" localize="false" xml-lang="en-US">Function FileOpenDialog(title As String) As String</paragraph> -<paragraph id="par_idm1206770832" role="bascode" localize="false" xml-lang="en-US"> filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")</paragraph> -<paragraph id="par_idm1206769648" role="bascode" localize="false" xml-lang="en-US"> filepicker.Title = title</paragraph> -<paragraph id="par_idm1206768496" role="bascode" localize="false" xml-lang="en-US"> filepicker.execute()</paragraph> -<paragraph id="par_idm1206767344" role="bascode" localize="false" xml-lang="en-US"> files = filepicker.getFiles()</paragraph> -<paragraph id="par_idm1206766192" role="bascode" localize="false" xml-lang="en-US"> FileOpenDialog=files(0)</paragraph> +<paragraph id="par_idm1206770832" role="bascode" localize="false" xml-lang="en-US"> filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")</paragraph> +<paragraph id="par_idm1206769648" role="bascode" localize="false" xml-lang="en-US"> filepicker.Title = title</paragraph> +<paragraph id="par_idm1206768496" role="bascode" localize="false" xml-lang="en-US"> filepicker.execute()</paragraph> +<paragraph id="par_idm1206767344" role="bascode" localize="false" xml-lang="en-US"> files = filepicker.getFiles()</paragraph> +<paragraph id="par_idm1206766192" role="bascode" localize="false" xml-lang="en-US"> FileOpenDialog=files(0)</paragraph> <paragraph id="par_idm1206765040" role="bascode" localize="false" xml-lang="en-US">End Function</paragraph> </bascode> </body> 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 @@ <paragraph id="par_id3150592" role="paragraph" xml-lang="en-US">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:</paragraph> <bascode> <paragraph id="par_idm1340499136" role="bascode" localize="false" xml-lang="en-US">Sub ContListener_disposing( oEvent )</paragraph> -<paragraph id="par_id3153876" role="bascode" xml-lang="en-US"> MsgBox "disposing"</paragraph> -<paragraph id="par_idm1340496176" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> +<paragraph id="par_id3153876" role="bascode" xml-lang="en-US"> MsgBox "disposing"</paragraph> +<paragraph id="par_idm1340496176" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> <paragraph id="par_idm1340684736" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340683504" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340682256" role="bascode" localize="false" xml-lang="en-US">Sub ContListener_elementInserted( oEvent )</paragraph> -<paragraph id="par_id3154098" role="bascode" xml-lang="en-US"> MsgBox "elementInserted"</paragraph> -<paragraph id="par_idm1340679264" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> +<paragraph id="par_id3154098" role="bascode" xml-lang="en-US"> MsgBox "elementInserted"</paragraph> +<paragraph id="par_idm1340679264" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> <paragraph id="par_idm1340678016" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340676784" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340675584" role="bascode" localize="false" xml-lang="en-US">Sub ContListener_elementRemoved( oEvent )</paragraph> -<paragraph id="par_id3153947" role="bascode" xml-lang="en-US"> MsgBox "elementRemoved"</paragraph> -<paragraph id="par_idm1340672544" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> +<paragraph id="par_id3153947" role="bascode" xml-lang="en-US"> MsgBox "elementRemoved"</paragraph> +<paragraph id="par_idm1340672544" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> <paragraph id="par_idm1340671296" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> <paragraph id="par_idm1340670064" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1340668864" role="bascode" localize="false" xml-lang="en-US">Sub ContListener_elementReplaced( oEvent )</paragraph> -<paragraph id="par_id3148915" role="bascode" xml-lang="en-US"> MsgBox "elementReplaced"</paragraph> -<paragraph id="par_idm1340665824" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> +<paragraph id="par_id3148915" role="bascode" xml-lang="en-US"> MsgBox "elementReplaced"</paragraph> +<paragraph id="par_idm1340665824" role="bascode" localize="false" xml-lang="en-US"> MsgBox oEvent.Dbg_Properties</paragraph> <paragraph id="par_idm1340664576" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> <paragraph id="par_id3156056" role="paragraph" xml-lang="en-US">You do not need to include the parameter of an event object if the object is not used:</paragraph> 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 @@ <paragraph id="par_idm1341584928" role="bascode" localize="false" xml-lang="en-US">Sub Main</paragraph> <paragraph id="par_id3154123" role="bascode" xml-lang="en-US">' updates the "Table of Contents" in a text doc</paragraph> <paragraph id="par_idm1341581904" role="bascode" localize="false" xml-lang="en-US">Dim allindexes, index As Object</paragraph> -<paragraph id="par_idm1341580656" role="bascode" localize="false" xml-lang="en-US"> allindexes = ThisComponent.getDocumentIndexes()</paragraph> -<paragraph id="par_id3153194" role="bascode" xml-lang="en-US"> index = allindexes.getByName("Table of Contents1")</paragraph> -<paragraph id="par_id3156422" role="bascode" xml-lang="en-US"> ' use the default name for Table of Contents and a 1</paragraph> -<paragraph id="par_idm1341575840" role="bascode" localize="false" xml-lang="en-US"> index.update()</paragraph> +<paragraph id="par_idm1341580656" role="bascode" localize="false" xml-lang="en-US"> allindexes = ThisComponent.getDocumentIndexes()</paragraph> +<paragraph id="par_id3153194" role="bascode" xml-lang="en-US"> index = allindexes.getByName("Table of Contents1")</paragraph> +<paragraph id="par_id3156422" role="bascode" xml-lang="en-US"> ' use the default name for Table of Contents and a 1</paragraph> +<paragraph id="par_idm1341575840" role="bascode" localize="false" xml-lang="en-US"> index.update()</paragraph> <paragraph id="par_idm1341574608" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> 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 @@ <paragraph id="par_idN105A9" role="heading" level="2" xml-lang="en-US">Example:</paragraph> <bascode> <paragraph id="par_idm1341251920" role="bascode" localize="false" xml-lang="en-US">Type address</paragraph> -<paragraph id="par_idm1341250688" role="bascode" localize="false" xml-lang="en-US"> Name1 As String</paragraph> -<paragraph id="par_idm1341249456" role="bascode" localize="false" xml-lang="en-US"> City As String</paragraph> +<paragraph id="par_idm1341250688" role="bascode" localize="false" xml-lang="en-US"> Name1 As String</paragraph> +<paragraph id="par_idm1341249456" role="bascode" localize="false" xml-lang="en-US"> City As String</paragraph> <paragraph id="par_idm1341248224" role="bascode" localize="false" xml-lang="en-US">End Type</paragraph> <paragraph id="par_idm1341246992" role="bascode" localize="false" xml-lang="en-US"> </paragraph> <paragraph id="par_idm1341245744" role="bascode" localize="false" xml-lang="en-US">Sub main</paragraph> -<paragraph id="par_idm1341244512" role="bascode" localize="false" xml-lang="en-US"> myaddress = CreateObject("address")</paragraph> -<paragraph id="par_idm1341243264" role="bascode" localize="false" xml-lang="en-US"> MsgBox IsObject(myaddress)</paragraph> +<paragraph id="par_idm1341244512" role="bascode" localize="false" xml-lang="en-US"> myaddress = CreateObject("address")</paragraph> +<paragraph id="par_idm1341243264" role="bascode" localize="false" xml-lang="en-US"> MsgBox IsObject(myaddress)</paragraph> <paragraph id="par_idm1341242016" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> </bascode> </body> |