Array Statements & Functions

 

 

Statement

What it Does

Comments

Array(arguments)

Returns aVariant data item that contains an array.

 

arguments refers to a comma-delimited list of values that are the elements of the array; the first value corresponds to the first array element, the second value to the second array element, etc.

Dim

 

 

See Entry in Declaration Statements

Erase arraylist

Reinitializes elements in one or more fixed-size arrays and frees up the dynamic-array storage space occupied by the array(s).

arraylist is one or more comma-delimited array names.

LBound (arrayname[, dimension])

Returns a Long value that s the smallest subscript for a dimensioned array (arrayname).

For multidimensional arrays, dimension is included to specify which dimension should be used.

Option Base [0|1]

Declares the default lower bound of array subscripts.

Option Base can only be used at module level.

ReDim [Preserve]

[varname(subscripts) _

[As type]][, varname(subscripts) _ [As type]][,...

Redimensions one or more dynamic array variables and reallocates their storage space.

 

(optional) Preserve is used to keep the contents of the array intact when it's being redimensioned. varname is the variable name, and As type(optional) indicates its data type. subscripts are the dimensions of the array variable.

Static [varname(subscripts) _

[As [New]type]] _

[, varname(subscripts) _

[As [New]type]] ...

 

Declares one or more static variables that retain their values as long as the program is running.

 

varname is the variable name, and (optional) As [New]type is its data type. If New is used, then an implicit creation of the object is made. (optional) subscripts are the array's dimensions

Ubound(arrayname[, dimension])

Returns a Long value that's the largest subscript for a dimensioned array (arrayname).

For multidimensional arrays, dimension is included to specify which dimension should be used.

Go Back to Top

arrowl2Return to the Visual Basic 6 Commands & Functions Page

Comments

 

Latest Version! NetObjects Fusion 10 

 

Copyright 1998 Rich Hamper 

All Rights Reserved

 

Last Updated:

Sunday, January 20, 2008