_ALen( ) API Library Routine

See Also   Example

Returns information about the dimensions of the array whose name table index is nti.

Syntax

long _ALen(NTI nti, int mode)
NTI nti;                     /* Array name table index. */
int mode;                     /* Mode to determine return value. */

Remarks

If mode is AL_ELEMENTS, _ALen( ) returns the total number of elements in the array. If mode is AL_SUBSCRIPT1, _ALen( ) returns the value of the first subscript used to declare the array. If mode is AL_SUBSCRIPT2, _ALen( ) returns the value of the second subscript used to declare the array.

If nti doesn't represent the name of an existing array, _ALen( ) returns  – 1 regardless of the value of mode.

For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.