summaryrefslogtreecommitdiff
path: root/source/text/sbasic/shared/03102101.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'source/text/sbasic/shared/03102101.xhp')
-rw-r--r--source/text/sbasic/shared/03102101.xhp30
1 files changed, 17 insertions, 13 deletions
diff --git a/source/text/sbasic/shared/03102101.xhp b/source/text/sbasic/shared/03102101.xhp
index ef08c0acb4..f3c3685598 100644
--- a/source/text/sbasic/shared/03102101.xhp
+++ b/source/text/sbasic/shared/03102101.xhp
@@ -47,8 +47,10 @@
<paragraph role="paragraph" id="par_id3154685" xml-lang="en-US" l10n="U" oldref="2">Declares a variable or an array.</paragraph>
</section>
<paragraph role="heading" id="hd_id3154218" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
-<paragraph role="paragraph" id="par_id3156214" xml-lang="en-US" l10n="U" oldref="4">[ReDim]Dim VarName [(start To end)] [As VarType][, VarName2 [(start To end)] [As VarType][,...]]</paragraph>
-<paragraph role="paragraph" id="par_id711996" xml-lang="en-US" l10n="NEW">Optionally, you can add the <emph>Preserve</emph> keyword as a parameter to preserve the contents of the array that is redimensioned.</paragraph>
+<bascode>
+<paragraph role="bascode" id="par_id3156214" xml-lang="en-US" oldref="4">[ReDim]Dim VarName [(start To end)] [As VarType][, VarName2 [(start To end)] [As VarType][,...]]</paragraph>
+</bascode>
+<paragraph role="paragraph" id="par_id711996" xml-lang="en-US">Optionally, you can add the <emph>Preserve</emph> keyword as a parameter to preserve the contents of the array that is redimensioned.</paragraph>
<paragraph role="heading" id="hd_id3148451" xml-lang="en-US" level="2" l10n="U" oldref="5">Parameters:</paragraph>
<paragraph role="paragraph" id="par_id3156423" xml-lang="en-US" l10n="U" oldref="6">
<emph>VarName:</emph> Any variable or array name.</paragraph>
@@ -86,16 +88,18 @@
<paragraph role="paragraph" id="par_id3150321" xml-lang="en-US" l10n="U" oldref="26">rem numbered from -15 to 5</paragraph>
<paragraph role="paragraph" id="par_id3149018" xml-lang="en-US" l10n="U" oldref="27">Variable fields, regardless of type, can be made dynamic if they are dimensioned by ReDim at the procedure level in subroutines or functions. Normally, you can only set the range of an array once and you cannot modify it. Within a procedure, you can declare an array using the ReDim statement with numeric expressions to define the range of the field sizes.</paragraph>
<paragraph role="heading" id="hd_id3148405" xml-lang="en-US" level="2" l10n="U" oldref="28">Example:</paragraph>
-<paragraph role="paragraph" id="par_id3154362" xml-lang="en-US" l10n="U" oldref="29">Sub ExampleRedim</paragraph>
-<paragraph role="paragraph" id="par_id3150042" xml-lang="en-US" l10n="U" oldref="30">Dim iVar() As Integer, iCount As Integer</paragraph>
-<paragraph role="paragraph" id="par_id3147339" xml-lang="en-US" l10n="U" oldref="31">ReDim iVar(5) As integer</paragraph>
-<paragraph role="paragraph" id="par_id3149106" xml-lang="en-US" l10n="U" oldref="32">For iCount = 1 To 5</paragraph>
-<paragraph role="paragraph" id="par_id3155174" xml-lang="en-US" l10n="U" oldref="33">iVar(iCount) = iCount</paragraph>
-<paragraph role="paragraph" id="par_id3163805" xml-lang="en-US" l10n="U" oldref="34">Next iCount</paragraph>
-<paragraph role="paragraph" id="par_id3149568" xml-lang="en-US" l10n="U" oldref="35">ReDim iVar(10) As integer</paragraph>
-<paragraph role="paragraph" id="par_id3147364" xml-lang="en-US" l10n="U" oldref="36">For iCount = 1 To 10</paragraph>
-<paragraph role="paragraph" id="par_id3155335" xml-lang="en-US" l10n="U" oldref="37">iVar(iCount) = iCount</paragraph>
-<paragraph role="paragraph" id="par_id3154662" xml-lang="en-US" l10n="U" oldref="38">Next iCount</paragraph>
-<paragraph role="paragraph" id="par_id3149926" xml-lang="en-US" l10n="U" oldref="39">end sub</paragraph>
+<bascode>
+<paragraph role="bascode" localize="false" xml-lang="en-US">Sub ExampleRedim</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">Dim iVar() As Integer, iCount As Integer</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">ReDim iVar(5) As Integer</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">For iCount = 1 To 5</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US"> iVar(iCount) = iCount</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">Next iCount</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">ReDim iVar(10) As Integer</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">For iCount = 1 To 10</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US"> iVar(iCount) = iCount</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">Next iCount</paragraph>
+<paragraph role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
+</bascode>
</body>
</helpdocument>