LOTUSSCRIPT 言語
' The ReDim statement can't change the data type of an ' existing array.If you specify a data type for array y in ' the ReDim statement, it must be String.
ReDim y(5) As String Print DataType(y$(1)) ' Prints 8.
例 2Option Base 1 ' Declare a two-dimensional dynamic array, of Variant type. ReDim markMar(2, 2) ' Assign a value to each element. markMar(1, 1) = 1 markMar(2, 1) = 2 markMar(1, 2) = 3 markMar(2, 2) = 4
' Change the upper bound of the last dimension of markMar ' from 2 to 3, preserving the values already stored in ' existing elements of markMar. ReDim Preserve markMar(2,3)
' Assign values to the additional elements of markMar. markMar(1, 3) = 5 markMar(2, 3) = 6
関連項目