summaryrefslogtreecommitdiff
path: root/source/text/sbasic/shared
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2013-02-12 18:41:54 +0100
committerAndras Timar <atimar@suse.com>2013-02-12 18:41:54 +0100
commita5cae6c3e83ddae0b26fac30cf95378d2a5882a3 (patch)
treeaa1d66ccb263f5eeaac599f2b8935172eaaebffd /source/text/sbasic/shared
parent0ba3d9a4202cd6418c4007a89e8c5fa73f0c9f05 (diff)
remove inline tags from Basic code examples
Change-Id: Ie6731f769e311f2eb1793694828085661ee0ff09
Diffstat (limited to 'source/text/sbasic/shared')
-rw-r--r--source/text/sbasic/shared/01020300.xhp6
-rw-r--r--source/text/sbasic/shared/03010103.xhp9
2 files changed, 11 insertions, 4 deletions
diff --git a/source/text/sbasic/shared/01020300.xhp b/source/text/sbasic/shared/01020300.xhp
index 6063c7650f..26c174f040 100644
--- a/source/text/sbasic/shared/01020300.xhp
+++ b/source/text/sbasic/shared/01020300.xhp
@@ -55,7 +55,7 @@
<paragraph role="heading" id="hd_id3153770" xml-lang="en-US" level="2" l10n="U" oldref="26">Passing Variables to Procedures (SUB) and Functions (FUNCTION)</paragraph>
<paragraph role="paragraph" id="par_id3155414" xml-lang="en-US" l10n="U" oldref="27">Variables can be passed to both procedures and functions. The SUB or FUNCTION must be declared to expect parameters:</paragraph>
<bascode>
-<paragraph role="bascode" localize="false" xml-lang="en-US">Sub SubName(<emph>Parameter1 As Type, Parameter2 As Type,...</emph>)</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">Sub SubName(Parameter1 As Type, Parameter2 As Type,...)</paragraph>
<paragraph role="bascode" id="par_id3151114" xml-lang="en-US" l10n="U" oldref="29">Program code</paragraph>
<paragraph role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
</bascode>
@@ -84,7 +84,7 @@
<paragraph role="paragraph" id="par_id3155765" xml-lang="en-US" l10n="U" oldref="47">Parameters can be passed to a SUB or a FUNCTION either by reference or by value. Unless otherwise specified, a parameter is always passed by reference. That means that a SUB or a FUNCTION gets the parameter and can read and modify its value.</paragraph>
<paragraph role="paragraph" id="par_id3145640" xml-lang="en-US" l10n="U" oldref="53">If you want to pass a parameter by value insert the key word "ByVal" in front of the parameter when you call a SUB or FUNCTION, for example:</paragraph>
<bascode>
-<paragraph role="bascode" id="par_id3150042" xml-lang="en-US" l10n="U" oldref="54">Result = Function(<emph>ByVal</emph> Parameter)</paragraph>
+<paragraph role="bascode" id="par_id3150042" xml-lang="en-US" l10n="U" oldref="54">Result = Function(ByVal Parameter)</paragraph>
</bascode>
<paragraph role="paragraph" id="par_id3149258" xml-lang="en-US" l10n="U" oldref="55">In this case, the original content of the parameter will not be modified by the FUNCTION since it only gets the value and not the parameter itself.</paragraph>
<paragraph role="heading" id="hd_id3150982" xml-lang="en-US" level="2" l10n="U" oldref="57">Scope of Variables</paragraph>
@@ -134,7 +134,7 @@
<paragraph role="heading" id="hd_id3155809" xml-lang="en-US" level="2" l10n="U" oldref="41">Specifying the Return Value Type of a FUNCTION</paragraph>
<paragraph role="paragraph" id="par_id3149404" xml-lang="en-US" l10n="U" oldref="42">As with variables, include a type-declaration character after the function name, or the type indicated by "As" and the corresponding key word at the end of the parameter list to define the type of the function's return value, for example:</paragraph>
<bascode>
-<paragraph role="bascode" localize="false" xml-lang="en-US">Function WordCount(WordText As String) <emph>As Integer</emph></paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">Function WordCount(WordText As String) As Integer</paragraph>
</bascode>
</body>
</helpdocument>
diff --git a/source/text/sbasic/shared/03010103.xhp b/source/text/sbasic/shared/03010103.xhp
index b6d36673c8..c4987b6a4a 100644
--- a/source/text/sbasic/shared/03010103.xhp
+++ b/source/text/sbasic/shared/03010103.xhp
@@ -58,7 +58,14 @@
<paragraph role="bascode" localize="false" xml-lang="en-US"> Print "ABC"</paragraph>
<paragraph role="bascode" localize="false" xml-lang="en-US"> Print "ABC","123"</paragraph>
<paragraph role="bascode" localize="false" xml-lang="en-US"> i = FreeFile()</paragraph>
-<paragraph role="bascode" localize="false" xml-lang="en-US"> Open <switchinline select="sys"><caseinline select="WIN">"C:\Temp.txt"</caseinline><defaultinline>"~/temp.txt"</defaultinline></switchinline> For Output As i</paragraph>
+<switch select="sys">
+<case select="WIN">
+<paragraph role="bascode" localize="false" xml-lang="en-US"> Open "C:\Temp.txt" For Output As i</paragraph>
+</case>
+<default>
+<paragraph role="bascode" localize="false" xml-lang="en-US"> Open "~/temp.txt" For Output As i</paragraph>
+</default>
+</switch>
<paragraph role="bascode" localize="false" xml-lang="en-US"> Print #i, "ABC"</paragraph>
<paragraph role="bascode" localize="false" xml-lang="en-US"> Close #i</paragraph>
<paragraph role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>