diff options
author | Andras Timar <atimar@suse.com> | 2012-09-13 13:52:06 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-09-13 13:52:06 +0200 |
commit | e9f3bd2782afcd2dc1c89593c98891a06f6d40d6 (patch) | |
tree | 736b4357b0c1cd202fd134024fa836c04e96c17b /helpcontent2/source/text | |
parent | e3ed3283b7867afa0084371e2050ed6a23a59d37 (diff) |
change paragraph role to 'code' for Basic code
Change-Id: I2d8b4a062858678561c6808f106a29035b144794
Diffstat (limited to 'helpcontent2/source/text')
-rw-r--r-- | helpcontent2/source/text/sbasic/shared/03090101.xhp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/03090101.xhp b/helpcontent2/source/text/sbasic/shared/03090101.xhp index 409372d2d4..120c3452e9 100644 --- a/helpcontent2/source/text/sbasic/shared/03090101.xhp +++ b/helpcontent2/source/text/sbasic/shared/03090101.xhp @@ -56,20 +56,20 @@ <paragraph role="warning" id="par_id3152939" xml-lang="en-US" l10n="U" oldref="9">You can use <emph>GoTo</emph> and <emph>GoSub</emph> to jump out of an <emph>If...Then</emph> block, but not to jump into an <emph>If...Then</emph> structure.</paragraph> <paragraph role="paragraph" id="par_id3153951" xml-lang="en-US" l10n="U" oldref="10">The following example enables you to enter the expiration date of a product, and determines if the expiration date has passed.</paragraph> <paragraph role="heading" id="hd_id3152576" xml-lang="en-US" level="2" l10n="U" oldref="11">Example:</paragraph> -<paragraph role="paragraph" id="par_id3150011" xml-lang="en-US" l10n="U" oldref="12">Sub ExampleIfThenDate</paragraph> -<paragraph role="paragraph" id="par_id3148645" xml-lang="en-US" l10n="U" oldref="13">Dim sDate as String</paragraph> -<paragraph role="paragraph" id="par_id3155855" xml-lang="en-US" l10n="U" oldref="14">Dim sToday as String</paragraph> -<paragraph role="paragraph" id="par_id3154490" xml-lang="en-US" l10n="U" oldref="16">sDate = InputBox("Enter the expiration date (MM.DD.YYYY)")</paragraph> -<paragraph role="paragraph" id="par_id3154943" xml-lang="en-US" l10n="U" oldref="17">sDate = Right$(sDate, 4) + Mid$(sDate, 4, 2) + Left$(sDate, 2)</paragraph> -<paragraph role="paragraph" id="par_id3154098" xml-lang="en-US" l10n="U" oldref="18">sToday = Date$</paragraph> -<paragraph role="paragraph" id="par_id3144765" xml-lang="en-US" l10n="U" oldref="19">sToday = Right$(sToday, 4)+ Mid$(sToday, 4, 2) + Left$(sToday, 2)</paragraph> -<paragraph role="paragraph" id="par_id3154792" xml-lang="en-US" l10n="U" oldref="20">If sDate < sToday Then</paragraph> -<paragraph role="paragraph" id="par_id3155601" xml-lang="en-US" l10n="U" oldref="21">MsgBox "The expiration date has passed"</paragraph> -<paragraph role="paragraph" id="par_id3146972" xml-lang="en-US" l10n="U" oldref="22">ElseIf sDate > sToday Then</paragraph> -<paragraph role="paragraph" id="par_id3146912" xml-lang="en-US" l10n="U" oldref="23">MsgBox "The expiration date has not yet passed"</paragraph> -<paragraph role="paragraph" id="par_id3153710" xml-lang="en-US" l10n="U" oldref="24">Else</paragraph> -<paragraph role="paragraph" id="par_id3154754" xml-lang="en-US" l10n="U" oldref="25">MsgBox "The expiration date is today"</paragraph> -<paragraph role="paragraph" id="par_id3154361" xml-lang="en-US" l10n="U" oldref="26">End If</paragraph> -<paragraph role="paragraph" id="par_id3148405" xml-lang="en-US" l10n="U" oldref="28">End Sub</paragraph> +<paragraph role="code" id="par_id3150011" xml-lang="en-US" l10n="U" oldref="12">Sub ExampleIfThenDate</paragraph> +<paragraph role="code" id="par_id3148645" xml-lang="en-US" l10n="U" oldref="13">Dim sDate as String</paragraph> +<paragraph role="code" id="par_id3155855" xml-lang="en-US" l10n="U" oldref="14">Dim sToday as String</paragraph> +<paragraph role="code" id="par_id3154490" xml-lang="en-US" l10n="U" oldref="16">sDate = InputBox("Enter the expiration date (MM.DD.YYYY)")</paragraph> +<paragraph role="code" id="par_id3154943" xml-lang="en-US" l10n="U" oldref="17">sDate = Right$(sDate, 4) + Mid$(sDate, 4, 2) + Left$(sDate, 2)</paragraph> +<paragraph role="code" id="par_id3154098" xml-lang="en-US" l10n="U" oldref="18">sToday = Date$</paragraph> +<paragraph role="code" id="par_id3144765" xml-lang="en-US" l10n="U" oldref="19">sToday = Right$(sToday, 4)+ Mid$(sToday, 4, 2) + Left$(sToday, 2)</paragraph> +<paragraph role="code" id="par_id3154792" xml-lang="en-US" l10n="U" oldref="20">If sDate < sToday Then</paragraph> +<paragraph role="code" id="par_id3155601" xml-lang="en-US" l10n="U" oldref="21">MsgBox "The expiration date has passed"</paragraph> +<paragraph role="code" id="par_id3146972" xml-lang="en-US" l10n="U" oldref="22">ElseIf sDate > sToday Then</paragraph> +<paragraph role="code" id="par_id3146912" xml-lang="en-US" l10n="U" oldref="23">MsgBox "The expiration date has not yet passed"</paragraph> +<paragraph role="code" id="par_id3153710" xml-lang="en-US" l10n="U" oldref="24">Else</paragraph> +<paragraph role="code" id="par_id3154754" xml-lang="en-US" l10n="U" oldref="25">MsgBox "The expiration date is today"</paragraph> +<paragraph role="code" id="par_id3154361" xml-lang="en-US" l10n="U" oldref="26">End If</paragraph> +<paragraph role="code" id="par_id3148405" xml-lang="en-US" l10n="U" oldref="28">End Sub</paragraph> </body> </helpdocument> |