Operator () (Array Index)

Returns a reference to an element in an array

Syntax
	KeyPgDeclareDeclare KeyPgOperatorOperator () ( lhs() KeyPgAsAs T, KeyPgByrefByRef rhs KeyPgAsAs KeyPgIntegerInteger, ... ) KeyPgByrefFunctionByRef KeyPgAsAs T

Usage
		result = lhs ( rhs [, ...] )
	or
		lhs ( rhs [, ...] ) = value

Parameters
	lhs
		An array.
	rhs
		An index of an element in the array.
	T
		Any data type.

Description
	This operator returns a reference to an element in an array. For 
	multidimensional arrays, multiple indexes must be specified (up to the 
	total number of dimensions of the array).

	For any dimension d in array a, any index less than KeyPgLboundLBound(a, d) or 
	greater than KeyPgUboundUBound(a, d) will result in a runtime error.

Example

	Dim array(0 To 4) As Integer = { 0, 1, 2, 3, 4 }

	For index As Integer = 0 To 4
	   Print array(index);
	Next
	Print

	will produce the output:


	 0 1 2 3 4

Differences from QB
	* None

See also
	* KeyPgOpPtrIndexOperator [] (Pointer Index)

