Saturday, May 17, 2008
Sensor Security Light Wiring
Dynamic Arrays
to use it when the number of elements to a dimension of the array are not the same. Dim
ArrayDinamic () 'leave empty parenthesis
recontar_items
Sub ReDim Array (a)' to allocate the array space
Array (a) = 34 * eye but no values
will be kept 'if we keep the values \u200b\u200bReDim Preserve
emplaremos arrayName (number) = value
ReDim Preserve Array (a) = 34' retain values \u200b\u200b
End sub
The ReDim statement to change the number elements of the array, not the number of dimensions.
For example, if the array_A declare a module level. Private
Array_A () as Integer
array to allocate space to use: ReDim
Array_A (5)
Whenever ReDim statement is executed, all values \u200b\u200bstored in the array are lost. When you want to change the size of array preserving the values \u200b\u200bof the array,
use the keyword ReDim Preserve. For example
Array_A ReDim Preserve (8)
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment