Previous: x/ zvipone Up: Parameter Routines Next: x/ zvparmd
call xvipstat(name, count, def, maxlen, type) status = zvipstat(name, count, def, maxlen, type);
This routine returns information about an interactive 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/ zviparm. 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.
NAME is the name of the interactive 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''.