Previous: x/ zvpone Up: Parameter Routines
call xvpstat(name, count, def, maxlen, type) status = zvpstat(name, count, def, maxlen, type);
This routine returns information about a parameter without returning its value. It is most useful to get the maximum length of any string and the number of strings in order to allocate a buffer before calling x/ zvparm. This routine is also the only way to determine the data type of a parameter given only its name. The program should know the type in the PDF, but there are situations where this could be useful.
Arguments:
NAME is the name of the parameter to get information about.
Returns the number of items in the parameter. If 0, parameter is either not found or is null.
Returns 1 if the parameter was defaulted, and 0 otherwise.
NOTE: The DEF flag is obsolete and should not be used.
Returns the maximum length of any value in the parameter. For REAL and INT, it is just the size of a REAL or INT. For STRING, it is the length of the longest string in the parameter. It does not include the null terminator, so you should add one before allocating a buffer in C.
Returns the data type of the parameter. The possible values are ``INT'', ``REAL'', and ``STRING''.