ArrInfo

Gets information about an array or map..

 
Syntax:

ArrInfo ( array, request )

Parameters:

(a) array: specifies an array.

(i) request: a flag specifying the information to retrieve (see below).

Returns:

(i) depends on request.

 

Request

Returns

-3

Checks if array is a WIL map (associative array.) Returns @TRUE if a map, @FALSE if not.

-2

Checks if array is a COM safearray. Returns @TRUE if a safearray, @FALSE if not.

-1

Checks if array is valid. Returns @TRUE if valid, @FALSE if invalid.

0

number of dimensions in the array

1

number of elements in dimension 1.  Can be used to count the number of key-value pairs in a WIL map.

2

number of elements in dimension 2 (or 0 if unused)

3

number of elements in dimension 3 (or 0 if unused)

4

number of elements in dimension 4 (or 0 if unused)

5

number of elements in dimension 5 (or 0 if unused)

6

number of elements in the entire array

 

 

Example:


myarray=ArrDimension(1,2,3,4,5)
For request = 0 To 6
   info = ArrInfo (myarray, request)
   Message("Array info: Request %request%", info )
Next
See Also:

Arrays, ArrayFileGet, ArrayFileGetCsv, ArrayFilePut, ArrayFilePutCsv, ArrayFromStr, ArrayInsert, ArrayizeArrayItemize, ArrayLocate, ArrayRedim, ArrayRemove, ArrayReverse, ArraySort, ArraySwapElements, ArrayToStr, ArrDimension, ArrInfo, ArrInitalize, Drop