diff options
Diffstat (limited to 'source/text/sbasic/shared/03090102.xhp')
-rw-r--r-- | source/text/sbasic/shared/03090102.xhp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/source/text/sbasic/shared/03090102.xhp b/source/text/sbasic/shared/03090102.xhp index 80fdedca72..ab2bc42f86 100644 --- a/source/text/sbasic/shared/03090102.xhp +++ b/source/text/sbasic/shared/03090102.xhp @@ -48,26 +48,30 @@ <paragraph role="paragraph" id="par_id3153896" xml-lang="en-US" l10n="U" oldref="2">Defines one or more statement blocks depending on the value of an expression.</paragraph> </section> <paragraph role="heading" id="hd_id3147265" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph> -<paragraph role="paragraph" id="par_id3150400" xml-lang="en-US" l10n="U" oldref="4">Select Case condition Case expression Statement Block [Case expression2 Statement Block][Case Else] Statement Block End Select</paragraph> +<bascode>
+<paragraph role="bascode" id="par_id3150400" xml-lang="en-US" oldref="4">Select Case condition Case expression Statement Block [Case expression2 Statement Block][Case Else] Statement Block End Select</paragraph>
+</bascode> <paragraph role="heading" id="hd_id3150767" xml-lang="en-US" level="2" l10n="U" oldref="5">Parameters:</paragraph> <paragraph role="paragraph" id="par_id3156281" xml-lang="en-US" l10n="U" oldref="6"> <emph>Condition:</emph> Any expression that controls if the statement block that follows the respective Case clause is executed.</paragraph> <paragraph role="paragraph" id="par_id3150448" xml-lang="en-US" l10n="U" oldref="7"> <emph>Expression:</emph> Any expression that is compatible with the Condition type expression. The statement block that follows the Case clause is executed if <emph>Condition</emph> matches <emph>Expression</emph>.</paragraph> <paragraph role="heading" id="hd_id3153768" xml-lang="en-US" level="2" l10n="U" oldref="8">Example:</paragraph> -<paragraph role="paragraph" id="par_id3150441" xml-lang="en-US" l10n="U" oldref="9">Sub ExampleRandomSelect</paragraph> -<paragraph role="paragraph" id="par_id3152462" xml-lang="en-US" l10n="U" oldref="10">Dim iVar As Integer</paragraph> -<paragraph role="paragraph" id="par_id3149260" xml-lang="en-US" l10n="U" oldref="11">iVar = Int((15 * Rnd) -2)</paragraph> -<paragraph role="paragraph" id="par_id3151113" xml-lang="en-US" l10n="U" oldref="12">Select Case iVar</paragraph> -<paragraph role="paragraph" id="par_id3149481" xml-lang="en-US" l10n="U" oldref="13">Case 1 To 5</paragraph> -<paragraph role="paragraph" id="par_id3152597" xml-lang="en-US" l10n="U" oldref="14">Print "Number from 1 to 5"</paragraph> -<paragraph role="paragraph" id="par_id3147428" xml-lang="en-US" l10n="U" oldref="15">Case 6, 7, 8</paragraph> -<paragraph role="paragraph" id="par_id3147349" xml-lang="en-US" l10n="U" oldref="16">Print "Number from 6 to 8"</paragraph> -<paragraph role="paragraph" id="par_id3153729" xml-lang="en-US" l10n="U" oldref="17">Case 8 To 10</paragraph> -<paragraph role="paragraph" id="par_id3152886" xml-lang="en-US" l10n="U" oldref="18">Print "Greater than 8"</paragraph> -<paragraph role="paragraph" id="par_id3155414" xml-lang="en-US" l10n="U" oldref="19">Case Else</paragraph> -<paragraph role="paragraph" id="par_id3146975" xml-lang="en-US" l10n="U" oldref="20">Print "Out of range 1 to 10"</paragraph> -<paragraph role="paragraph" id="par_id3150419" xml-lang="en-US" l10n="U" oldref="21">End Select</paragraph> -<paragraph role="paragraph" id="par_id3154943" xml-lang="en-US" l10n="U" oldref="22">end sub</paragraph> +<bascode> +<paragraph role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomSelect</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> iVar = Int((15 * Rnd) -2)</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> Select Case iVar</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> Case 1 To 5</paragraph> +<paragraph role="bascode" id="par_id3152597" xml-lang="en-US" l10n="U" oldref="14"> Print "Number from 1 to 5"</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> Case 6, 7, 8</paragraph> +<paragraph role="bascode" id="par_id3147349" xml-lang="en-US" l10n="U" oldref="16"> Print "Number from 6 to 8"</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> Case 8 To 10</paragraph> +<paragraph role="bascode" id="par_id3152886" xml-lang="en-US" l10n="U" oldref="18"> Print "Greater than 8"</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> Case Else</paragraph> +<paragraph role="bascode" id="par_id3146975" xml-lang="en-US" l10n="U" oldref="20"> Print "Out of range 1 to 10"</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US"> End Select</paragraph> +<paragraph role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> +</bascode> </body> </helpdocument> |