summaryrefslogtreecommitdiff
path: root/helpcontent2/source
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-09-24 14:02:05 +0200
committerAndras Timar <atimar@suse.com>2012-09-24 14:02:05 +0200
commit7175bf45cdd40029d33213fe559525b185b6db78 (patch)
treefbc1ea5c32c993414f00136ce63558348a3f99f6 /helpcontent2/source
parent821c0522e017a19e0d3fd1fe3a1bf76692fe81b9 (diff)
format a few Basic code examples
Change-Id: I6c1563eb7f1b3d8b353da963ab7521e17c57e24f
Diffstat (limited to 'helpcontent2/source')
-rw-r--r--helpcontent2/source/text/sbasic/shared/03030101.xhp18
-rw-r--r--helpcontent2/source/text/sbasic/shared/03030102.xhp8
-rw-r--r--helpcontent2/source/text/sbasic/shared/03030103.xhp12
-rw-r--r--helpcontent2/source/text/sbasic/shared/03030104.xhp12
-rw-r--r--helpcontent2/source/text/sbasic/shared/03030105.xhp44
-rw-r--r--helpcontent2/source/text/sbasic/shared/03030106.xhp12
6 files changed, 62 insertions, 44 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/03030101.xhp b/helpcontent2/source/text/sbasic/shared/03030101.xhp
index 0024d716f..c088a10fb 100644
--- a/helpcontent2/source/text/sbasic/shared/03030101.xhp
+++ b/helpcontent2/source/text/sbasic/shared/03030101.xhp
@@ -66,13 +66,15 @@
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="heading" id="hd_id3155411" xml-lang="en-US" level="2" l10n="U" oldref="15">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3148646" xml-lang="en-US" l10n="U" oldref="16">Sub ExampleDateSerial</paragraph>
-<paragraph role="paragraph" id="par_id3156441" xml-lang="en-US" l10n="U" oldref="17">Dim lDate as Long</paragraph>
-<paragraph role="paragraph" id="par_id3154791" xml-lang="en-US" l10n="U" oldref="18">Dim sDate as String</paragraph>
-<paragraph role="paragraph" id="par_id3155415" xml-lang="en-US" l10n="U" oldref="19">lDate = DateSerial(1964, 4, 9)</paragraph>
-<paragraph role="paragraph" id="par_id3147125" xml-lang="en-US" l10n="U" oldref="20">sDate = DateSerial(1964, 4, 9)</paragraph>
-<paragraph role="paragraph" id="par_id3154942" xml-lang="en-US" l10n="U" oldref="21">msgbox lDate REM returns 23476</paragraph>
-<paragraph role="paragraph" id="par_id3151074" xml-lang="en-US" l10n="CHG" oldref="22">msgbox sDate REM returns 04/09/1964</paragraph>
-<paragraph role="paragraph" id="par_id3153878" xml-lang="en-US" l10n="U" oldref="23">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3148646" xml-lang="en-US" localize="false">Sub ExampleDateSerial</paragraph>
+<paragraph role="bascode" id="par_id3156441" xml-lang="en-US" localize="false">Dim lDate As Long</paragraph>
+<paragraph role="bascode" id="par_id3154791" xml-lang="en-US" localize="false">Dim sDate As String</paragraph>
+<paragraph role="bascode" id="par_id3155415" xml-lang="en-US" localize="false"> lDate = DateSerial(1964, 4, 9)</paragraph>
+<paragraph role="bascode" id="par_id3147125" xml-lang="en-US" localize="false"> sDate = DateSerial(1964, 4, 9)</paragraph>
+<paragraph role="bascode" id="par_id3154942" xml-lang="en-US"> MsgBox lDate ' returns 23476</paragraph>
+<paragraph role="bascode" id="par_id3151074" xml-lang="en-US"> MsgBox sDate ' returns 04/09/1964</paragraph>
+<paragraph role="bascode" id="par_id3153878" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>
diff --git a/helpcontent2/source/text/sbasic/shared/03030102.xhp b/helpcontent2/source/text/sbasic/shared/03030102.xhp
index 917e95ef2..78b8e8e55 100644
--- a/helpcontent2/source/text/sbasic/shared/03030102.xhp
+++ b/helpcontent2/source/text/sbasic/shared/03030102.xhp
@@ -61,8 +61,10 @@
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="heading" id="hd_id3153142" xml-lang="en-US" level="2" l10n="U" oldref="24">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3155412" xml-lang="en-US" l10n="U" oldref="25">Sub ExampleDateValue</paragraph>
-<paragraph role="paragraph" id="par_id3153363" xml-lang="en-US" l10n="U" oldref="26">msgbox DateValue("12/02/1997")</paragraph>
-<paragraph role="paragraph" id="par_id3149262" xml-lang="en-US" l10n="U" oldref="27">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3155412" xml-lang="en-US" localize="false">Sub ExampleDateValue</paragraph>
+<paragraph role="bascode" id="par_id3153363" xml-lang="en-US" localize="false"> MsgBox DateValue("12/02/2011")</paragraph>
+<paragraph role="bascode" id="par_id3149262" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>
diff --git a/helpcontent2/source/text/sbasic/shared/03030103.xhp b/helpcontent2/source/text/sbasic/shared/03030103.xhp
index 045f688bf..38c735eed 100644
--- a/helpcontent2/source/text/sbasic/shared/03030103.xhp
+++ b/helpcontent2/source/text/sbasic/shared/03030103.xhp
@@ -54,13 +54,17 @@
<paragraph role="paragraph" id="par_id3156423" xml-lang="en-US" l10n="U" oldref="8">
<emph>Number:</emph> A numeric expression that contains a serial date number from which you can determine the day of the month.</paragraph>
<paragraph role="paragraph" id="par_id3145786" xml-lang="en-US" l10n="U" oldref="9">This function is basically the opposite of the DateSerial function, returning the day of the month from a serial date number generated by the <emph>DateSerial</emph> or the <emph>DateValue</emph> function. For example, the expression</paragraph>
-<paragraph role="paragraph" id="par_id3145364" xml-lang="en-US" l10n="U" oldref="10">Print Day (DateSerial(1994, 12, 20))</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3145364" xml-lang="en-US" localize="false">Print Day (DateSerial(1994, 12, 20))</paragraph>
+</bascode>
<paragraph role="paragraph" id="par_id3153190" xml-lang="en-US" l10n="U" oldref="11">returns the value 20.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="heading" id="hd_id3149481" xml-lang="en-US" level="2" l10n="U" oldref="12">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3155413" xml-lang="en-US" l10n="U" oldref="13">sub ExampleDay</paragraph>
-<paragraph role="paragraph" id="par_id3149260" xml-lang="en-US" l10n="U" oldref="14">Print "Day " &amp; Day(DateSerial(1994, 12, 20)) &amp; " of the month"</paragraph>
-<paragraph role="paragraph" id="par_id3148645" xml-lang="en-US" l10n="U" oldref="15">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3155413" xml-lang="en-US" localize="false">Sub ExampleDay</paragraph>
+<paragraph role="bascode" id="par_id3149260" xml-lang="en-US" l10n="U" oldref="14"> Print "Day " &amp; Day(DateSerial(1994, 12, 20)) &amp; " of the month"</paragraph>
+<paragraph role="bascode" id="par_id3148645" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>
diff --git a/helpcontent2/source/text/sbasic/shared/03030104.xhp b/helpcontent2/source/text/sbasic/shared/03030104.xhp
index 989f0af76..6addc4672 100644
--- a/helpcontent2/source/text/sbasic/shared/03030104.xhp
+++ b/helpcontent2/source/text/sbasic/shared/03030104.xhp
@@ -54,13 +54,17 @@
<paragraph role="paragraph" id="par_id3156423" xml-lang="en-US" l10n="U" oldref="8">
<emph>Number:</emph> Numeric expression that contains the serial date number that is used to determine the month of the year.</paragraph>
<paragraph role="paragraph" id="par_id3153770" xml-lang="en-US" l10n="U" oldref="9">This function is the opposite of the <emph>DateSerial </emph>function. It returns the month in the year that corresponds to the serial date that is generated by <emph>DateSerial</emph> or <emph>DateValue</emph>. For example, the expression</paragraph>
-<paragraph role="paragraph" id="par_id3147426" xml-lang="en-US" l10n="U" oldref="10">Print Month(DateSerial(1994, 12, 20))</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3147426" xml-lang="en-US" localize="false">Print Month(DateSerial(1994, 12, 20))</paragraph>
+</bascode>
<paragraph role="paragraph" id="par_id3145366" xml-lang="en-US" l10n="U" oldref="11">returns the value 12.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="heading" id="hd_id3146923" xml-lang="en-US" level="2" l10n="U" oldref="12">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3156442" xml-lang="en-US" l10n="U" oldref="13">Sub ExampleMonth</paragraph>
-<paragraph role="paragraph" id="par_id3149664" xml-lang="en-US" l10n="U" oldref="14">MsgBox "" &amp; Month(Now) ,64,"The current month"</paragraph>
-<paragraph role="paragraph" id="par_id3150012" xml-lang="en-US" l10n="U" oldref="15">End sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3156442" xml-lang="en-US" localize="false">Sub ExampleMonth</paragraph>
+<paragraph role="bascode" id="par_id3149664" xml-lang="en-US" l10n="U" oldref="14"> MsgBox "" &amp; Month(Now) ,64,"The current month"</paragraph>
+<paragraph role="bascode" id="par_id3150012" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>
diff --git a/helpcontent2/source/text/sbasic/shared/03030105.xhp b/helpcontent2/source/text/sbasic/shared/03030105.xhp
index aa9070caf..10245b344 100644
--- a/helpcontent2/source/text/sbasic/shared/03030105.xhp
+++ b/helpcontent2/source/text/sbasic/shared/03030105.xhp
@@ -57,26 +57,28 @@
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="heading" id="hd_id3148616" xml-lang="en-US" level="2" l10n="U" oldref="10">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3145749" xml-lang="en-US" l10n="U" oldref="11">Sub ExampleWeekDay</paragraph>
-<paragraph role="paragraph" id="par_id3147426" xml-lang="en-US" l10n="U" oldref="12">Dim sDay As String</paragraph>
-<paragraph role="paragraph" id="par_id3148576" xml-lang="en-US" l10n="U" oldref="13">REM Return and display the day of the week</paragraph>
-<paragraph role="paragraph" id="par_id3155412" xml-lang="en-US" l10n="U" oldref="14">Select Case WeekDay( Now )</paragraph>
-<paragraph role="paragraph" id="par_id3155306" xml-lang="en-US" l10n="U" oldref="15">case 1</paragraph>
-<paragraph role="paragraph" id="par_id3151117" xml-lang="en-US" l10n="U" oldref="16">sDay="Sunday"</paragraph>
-<paragraph role="paragraph" id="par_id3152460" xml-lang="en-US" l10n="U" oldref="17">case 2</paragraph>
-<paragraph role="paragraph" id="par_id3153952" xml-lang="en-US" l10n="U" oldref="18">sDay="Monday"</paragraph>
-<paragraph role="paragraph" id="par_id3149666" xml-lang="en-US" l10n="U" oldref="19">case 3</paragraph>
-<paragraph role="paragraph" id="par_id3153157" xml-lang="en-US" l10n="U" oldref="20">sDay="Tuesday"</paragraph>
-<paragraph role="paragraph" id="par_id3154730" xml-lang="en-US" l10n="U" oldref="21">case 4</paragraph>
-<paragraph role="paragraph" id="par_id3154942" xml-lang="en-US" l10n="U" oldref="22">sDay="Wednesday"</paragraph>
-<paragraph role="paragraph" id="par_id3145799" xml-lang="en-US" l10n="U" oldref="23">case 5</paragraph>
-<paragraph role="paragraph" id="par_id3155416" xml-lang="en-US" l10n="U" oldref="24">sDay="Thursday"</paragraph>
-<paragraph role="paragraph" id="par_id3150716" xml-lang="en-US" l10n="U" oldref="25">case 6</paragraph>
-<paragraph role="paragraph" id="par_id3154015" xml-lang="en-US" l10n="U" oldref="26">sDay="Friday"</paragraph>
-<paragraph role="paragraph" id="par_id3146971" xml-lang="en-US" l10n="U" oldref="27">case 7</paragraph>
-<paragraph role="paragraph" id="par_id3153707" xml-lang="en-US" l10n="U" oldref="28">sDay="Saturday"</paragraph>
-<paragraph role="paragraph" id="par_id3155065" xml-lang="en-US" l10n="U" oldref="29">End Select</paragraph>
-<paragraph role="paragraph" id="par_id3148993" xml-lang="en-US" l10n="U" oldref="30">msgbox "" + sDay,64,"Today is"</paragraph>
-<paragraph role="paragraph" id="par_id3149019" xml-lang="en-US" l10n="U" oldref="31">End Sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3145749" xml-lang="en-US" localize="false">Sub ExampleWeekDay</paragraph>
+<paragraph role="bascode" id="par_id3147426" xml-lang="en-US" localize="false">Dim sDay As String</paragraph>
+<paragraph role="bascode" id="par_id3148576" xml-lang="en-US" l10n="U" oldref="13">' Return And display the day of the week</paragraph>
+<paragraph role="bascode" id="par_id3155412" xml-lang="en-US" localize="false"> Select Case WeekDay( Now )</paragraph>
+<paragraph role="bascode" id="par_id3155306" xml-lang="en-US" localize="false"> Case 1</paragraph>
+<paragraph role="bascode" id="par_id3151117" xml-lang="en-US" l10n="U" oldref="16"> sDay="Sunday"</paragraph>
+<paragraph role="bascode" id="par_id3152460" xml-lang="en-US" localize="false"> Case 2</paragraph>
+<paragraph role="bascode" id="par_id3153952" xml-lang="en-US" l10n="U" oldref="18"> sDay="Monday"</paragraph>
+<paragraph role="bascode" id="par_id3149666" xml-lang="en-US" localize="false"> Case 3</paragraph>
+<paragraph role="bascode" id="par_id3153157" xml-lang="en-US" l10n="U" oldref="20"> sDay="Tuesday"</paragraph>
+<paragraph role="bascode" id="par_id3154730" xml-lang="en-US" localize="false"> Case 4</paragraph>
+<paragraph role="bascode" id="par_id3154942" xml-lang="en-US" l10n="U" oldref="22"> sDay="Wednesday"</paragraph>
+<paragraph role="bascode" id="par_id3145799" xml-lang="en-US" localize="false"> Case 5</paragraph>
+<paragraph role="bascode" id="par_id3155416" xml-lang="en-US" l10n="U" oldref="24"> sDay="Thursday"</paragraph>
+<paragraph role="bascode" id="par_id3150716" xml-lang="en-US" localize="false"> Case 6</paragraph>
+<paragraph role="bascode" id="par_id3154015" xml-lang="en-US" l10n="U" oldref="26"> sDay="Friday"</paragraph>
+<paragraph role="bascode" id="par_id3146971" xml-lang="en-US" localize="false"> Case 7</paragraph>
+<paragraph role="bascode" id="par_id3153707" xml-lang="en-US" l10n="U" oldref="28"> sDay="Saturday"</paragraph>
+<paragraph role="bascode" id="par_id3155065" xml-lang="en-US" localize="false"> End Select</paragraph>
+<paragraph role="bascode" id="par_id3148993" xml-lang="en-US" l10n="U" oldref="30"> MsgBox "" + sDay,64,"Today Is"</paragraph>
+<paragraph role="bascode" id="par_id3149019" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>
diff --git a/helpcontent2/source/text/sbasic/shared/03030106.xhp b/helpcontent2/source/text/sbasic/shared/03030106.xhp
index e1690c69b..544c63fdf 100644
--- a/helpcontent2/source/text/sbasic/shared/03030106.xhp
+++ b/helpcontent2/source/text/sbasic/shared/03030106.xhp
@@ -54,13 +54,17 @@
<paragraph role="paragraph" id="par_id3163712" xml-lang="en-US" l10n="U" oldref="8">
<emph>Number:</emph> Integer expression that contains the serial date number that is used to calculate the year.</paragraph>
<paragraph role="paragraph" id="par_id3152596" xml-lang="en-US" l10n="U" oldref="9">This function is the opposite of the <emph>DateSerial </emph>function, and returns the year of a serial date. For example, the expression:</paragraph>
-<paragraph role="paragraph" id="par_id3154319" xml-lang="en-US" l10n="U" oldref="10">Print Year(DateSerial(1994, 12, 20))</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3154319" xml-lang="en-US" localize="false">Print Year(DateSerial(1994, 12, 20))</paragraph>
+</bascode>
<paragraph role="paragraph" id="par_id3149483" xml-lang="en-US" l10n="U" oldref="11">returns the value 1994.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<paragraph role="heading" id="hd_id3146985" xml-lang="en-US" level="2" l10n="U" oldref="12">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3153952" xml-lang="en-US" l10n="U" oldref="13">Sub ExampleYear</paragraph>
-<paragraph role="paragraph" id="par_id3153363" xml-lang="en-US" l10n="U" oldref="14">MsgBox "" &amp; Year(Now) ,64,"Current year"</paragraph>
-<paragraph role="paragraph" id="par_id3145274" xml-lang="en-US" l10n="U" oldref="15">End sub</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3153952" xml-lang="en-US" localize="false">Sub ExampleYear</paragraph>
+<paragraph role="bascode" id="par_id3153363" xml-lang="en-US" l10n="U" oldref="14"> MsgBox "" &amp; Year(Now) ,64,"Current year"</paragraph>
+<paragraph role="bascode" id="par_id3145274" xml-lang="en-US" localize="false">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>