ReDim Statement [Runtime] /text/sbasic/shared/03102101.xhp Sun Microsystems, Inc. converted from old format - fpe
ReDim statement ReDim Statement [Runtime] Declares a variable or an array.
Syntax: [ReDim]Dim VarName [(start To end)] [As VarType][, VarName2 [(start To end)] [As VarType][,...]] Optionally, you can add the Preserve keyword as a parameter to preserve the contents of the array that is redimensioned. Parameters: VarName: Any variable or array name. Start, End: Numerical values or constants that define the number of elements (NumberElements=(end-start)+1) and the index range.UFI: deleted the numbers Start and End can be numeric expressions if ReDim is used at the procedure level. VarType: Keyword that declares the data type of a variable. Keyword: Variable type Bool: Boolean variable (True, False) Date: Date variable Double: Double floating point variable (1.79769313486232x10E308 - 4.94065645841247x10E-324) Integer: Integer variable (-32768 - 32767) Long: Long integer variable (-2,147,483,648 - 2,147,483,647) Object: Object variable (can only be subsequently defined by Set!) [Single]: Single floating-point variable (3.402823x10E38 - 1.401298x10E-45). If no key word is specified, a variable is defined as Single, unless a statement from DefBool to DefVar is used. String: String variable containing a maximum of 64,000 ASCII characters. Variant: Variant variable type (can contain all types and is set by definition). In $[officename] Basic, you do not need to declare variables explicitly. However, you need to declare an array before you can use them. You can declare a variable with the Dim statement, using commas to separate multiple declarations. To declare a variable type, enter a type-declaration character following the name or use a corresponding key word. $[officename] Basic supports single or multi-dimensional arrays that are defined by a specified variable type. Arrays are suitable if the program contains lists or tables that you want to edit. The advantage of arrays is that it is possible to address individual elements according to indexes, which can be formulated as numeric expressions or variables. There are two ways to set the range of indices for arrays declared with the Dim statement: DIM text(20) As String REM 21 elements numbered from 0 to 20 DIM text(5 to 25) As String REM 21 elements numbered from 5 to 25 DIM text$(-15 to 5) As String REM 21 elements (0 inclusive), rem numbered from -15 to 5 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. Example: Sub ExampleRedim Dim iVar() As Integer, iCount As Integer ReDim iVar(5) As integer For iCount = 1 To 5 iVar(iCount) = iCount Next iCount ReDim iVar(10) As integer For iCount = 1 To 10 iVar(iCount) = iCount Next iCount end sub
eature/BorderlineFix'>feature/BorderlineFix LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/lotuswordpro/qa
AgeCommit message (Expand)Author
2018-04-30ofz#8095 avoid recurse to deathCaolán McNamara
2018-03-25ofz#7109 infinite regressCaolán McNamara
2018-03-21ofz#7043 already registeredCaolán McNamara
2018-02-12ofz#6208 Indirect-leakCaolán McNamara
2017-03-14ofz#866 crash in LwpFormulaInfo::ReadArgumentsCaolán McNamara
2017-03-02avoid recursive register styleCaolán McNamara
2016-05-09fftester: subtable is a subtable of itselfCaolán McNamara
2016-05-08fftester: fail on double parse of the same tableCaolán McNamara
2016-05-05fftester: double use of XFTable, ref this upCaolán McNamara
2016-04-09pCont can be nullCaolán McNamara
2016-04-08foundry may be nullCaolán McNamara
2016-04-04currentlayout may be nullCaolán McNamara
2016-04-04hold bullet para by referenceCaolán McNamara
2016-04-03subtable corruption is possibleCaolán McNamara
2016-03-15recurse protection for XFConvertCaolán McNamara
2016-03-11tweat ExtMargins with same recurse protection as MarginsCaolán McNamara
2016-03-10Extract Directories from BootstrapFixtureBaseStephan Bergmann
2016-03-08avoid infinite regress in busted documentsCaolán McNamara
2016-03-07lwp: fix infinite recurseCaolán McNamara
2016-03-07improve defaultparams lopluginNoel Grandin
2015-11-04use uno::Reference::set method instead of assignmentNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-03-19convert SFX_FILTER_ constants to enum classNoel Grandin
2015-03-18create new 'enum class' SotClipboardFormatId to unify typesNoel Grandin
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
2013-04-22Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák