Previous: Parameter Routines Up: Parameter Routines Next: x/ zviparmd
call xvip(name, value, count) status = zvip(name, value, count);
Interactive version of x/ zvp; abbreviated version of x/ zviparm. Returns the value(s) of the given interactive parameter, and the number of values.
Arguments:
NAME is the name of the interactive parameter to get values from.
The value of the parameter is returned in the VALUE array. The type of the value depends on the type of the parameter, which is either INTEGER, STRING, or REAL (single-precision).
Note that there is no provision for providing a string length under C. Therefore, zvip should not be used for a string array. It is okay for a single string value, but if you want to get a multi-valued string, use zviparm instead. If you do get a multivalued string with zvip, it is returned in the zvsptr packed format, which is obsolete and should not be used. Under Fortran, this restriction does not apply, since the string length for each element can be obtained from the string itself.
There is no way to specify the size of the value buffer, so make sure it is big enough to handle the maximum count allowed in the PDF.
The number of values in the parameter is returned in COUNT.
Warning: In xvp, the value of COUNT is set to 0 if the parameter has been defaulted. This is actually a design flaw, but has been retained for compatibility. The other three routines, zvp, xvip, and zvip, do not have this flaw. Being new routines, they can be done correctly without compatibility problems. The COUNT parameter returns the actual number of parameters in the VALUE parameter, whether they are defaults or not. However, the variant behavior of xvp is likely to cause some confusion. Do not depend on this behavior in xvp, as it may change to be consistent in the future. If you are using xvp, either construct the PDF such that this problem won't matter, or use xvpcnt to get the actual count. This is a design flaw for two reasons: With the count returned as 0, there is no way to know if there is anything valid in the VALUE parameter, so it becomes useless. Second, the default flag should never be used; it is maintained for compatibility purposes only. The count of the parameter should be used instead.