Function _paralen() Foundation
Determines the number of elements in an array.
ULONG _paralen(XppParamList pList, ULONG ulIndex, ...);
Returns the length of the array. Arrays of length 0 are possible (if there are no elements). NULL is also returned when the parameter or the indexed array element does not refer to an array.
_paralen() and _paratype() are used to determine the structure and size of multidimensional arrays. If the first array index passed to paralen() is NULL, the length of the entire array is returned. If non-NULL indexes into the array are passed, the length of the corresponding subarray is determined. In CA Clipper the function _parinfa() is used to determine similar information, but it does not support multidimensional arrays.
/*
The example determines the length of an array.
*/
#include <xpppar.h>
LONG len;
/* Is parameter 1 an array? */
if ( XPP_IS_ARRAY( _partype(<pList>, 1) ) )
{
len = _paralen(<pList>, 1, 0); /* determines the length */
}
else
len = -1; /* error: store illegal length */
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.