Function _parclen() Foundation
Determines the length of a character string parameter.
ULONG _parclen(XppParamList pList, ULONG ulIndex, ...);
Returns the length of the character string. Character strings of NULL length are possible. When the parameter or the indexed array element is not a character string, NULL is also returned.
_parclen() determines the length of a character string which was passed as a parameter from Xbase++. NULL characters within the character string are also counted. However, the terminating NULL character is not counted. A buffer allocated for parc() should be one character longer than the length returned from _parclen().
/*
Determines the length of a character string.
*/
#include <xpppar.h>
LONG len;
/* Is second parameter 2 a string ? */
if ( XPP_IS_CHAR( _partype(<pList>, 2) ) )
{
len = _parclen(<pList>, 2); /* 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.