Array Handling

1.11 Array Handling

Erase Statement

 


 
Erase arraylist

 

arraylist required; String literal

A list of array variables to clear

Description

Releases an array object. This is equivalent to setting the array variable to Nothing. More than one array can be specified by using commas to delimit arraylist.

IsArray Function

Microsoft.VisualBasic.Information


IsArray(varname)

 

varname required; any variable

A variable that may be an array

Return Value

Boolean (True or False)

Description

Tests whether an object variable points to an array. Note that an uninitialized array returns False.

Join Function

Microsoft.VisualBasic.Strings


result = Join(sourcearray, [delimiter])

 

sourcearray required; String or Object array

Array whose elements are to be concatenated

delimiter optional; String

Character used to delimit the individual values in the string

Return Value

String

Description

Concatenates an array of values into a delimited string using a specified delimiter, or, if no delimiter is specified, a space.

LBound Function

Microsoft.VisualBasic.Information


LBound(array[, rank])

 

array required; any array

An array whose lower bound is to be determined

rank optional; Integer

The dimension whose lower bound is desired

Return Value

An Integer whose value is 0

Description

Determines the lower boundary of a specified dimension of an array. The lower boundary is the smallest subscript you can access within the specified array.

ReDim Statement

 


 
ReDim [Preserve] varname(subscripts) _
  [, varname(subscripts)  ...]

 

Preserve optional; Keyword

Preserves the data within an array when changing the only or last dimension

varname required; String literal

Name of the variable

subscripts required; Numeric

Number of elements and dimensions of the array, using the syntax:

upper [, upper] ...

The number of upper bounds specified is the number of dimensions. Each upper bound specifies the size of the corresponding coordinate.

Description

Used within a procedure to resize and reallocate storage space for an array

UBound Function

Microsoft.VisualBasic.Information


UBound(array[, rank])

 

array required; Any

The name of the array

rank optional; Integer

A number specifying the dimension of the array; if omitted, its value defaults to 1

Return Value

Integer; returns -1 if the array is uninitialized

Description

Indicates the upper limit of a specified coordinate of an array. The upper boundary is the largest subscript you can use with that coordinate.

VBFixedArray Attribute

Microsoft.VisualBasic.VBFixedArrayAttribute


New(size1[, size2])

 

size1 required; Integer

The upper limit of the array's first dimension

size2 optional; Integer

The upper limit of the array's second dimension

Description

Defines a fixed array. It can be used in defining fixed arrays within structures, particularly structures that are to be passed to Win32 API functions.

 



VB. NET Language Pocket Reference
VB.NET Language Pocket Reference
ISBN: 0596004281
EAN: 2147483647
Year: 2002
Pages: 31

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net