Up | Previous | Next | Title Page | Contents

5.2 Parameter I/O API

VICAR has sixteen parameter retrieval routines that may be called from an application program:

5.2.1 x/zvintract—Prompt user for interactive command

call xvintract( subcmd, prompt) 
zvintract( subcmd, prompt) 
A call to this subroutine initiates a TAE interactive parameter session and returns in a buffer the parameters input by the user. This buffer is not visible to the program, but these parameters can be retrieved by the program using subroutine x/zviparm.

Arguments:

5.2.2 x/zviparm—Return interactive parameter values

call xviparm(name, value, count, def, maxcnt)
status = zviparm(name, value, count, def, maxcnt, length);
x/zviparm returns information about the value(s) specified for a parameter interactively, given a parameter name. The returned information includes:
Both the parameter name and, if it is a character string, the value may be specified as CHARACTER*n type for FORTRAN or char for C.
For multivalued strings, the value should be a two-dimensional array of char (C) or an array of CHARACTER*n (Fortran). For C, the length of the inner dimension must be specified via the "length" parameter. If the length is 0, or a BYTE array is passed in Fortran, then the strings will be returned in the old x/zvsptr format, which has been deprecated and should no longer be used.
A call to subroutine x/zvintract is required before this routine is called, in order to initiate an interactive parameter session.
If an error occurs, such as the parameter wasn't found, then COUNT is returned as 0, and the action specified by x/zveaction is taken.

Arguments:

Optional arguments:

5.2.3 x/zvip—Interactive version of x/zvp; abbreviated version of x/zviparm

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:

5.2.4 x/zviparmd—Interactive version of x/zvparmd

call xviparmd(name, value, count, def, maxcnt) 
status = zviparmd(name, value, count, def, maxcnt, length);
Interactive version of x/zvparmd.
This routine is exactly like x/zviparm, except that if the interactive parameter being returned is REAL, the VALUE parameter is returned in double precision format. x/zviparm returns the value in single precision. Although VALUE supports integers and strings as well, x/zviparmd should generally be used only for double-precision numbers. x/zviparm should be used for integers and strings.
This routine replaces the functionality of the R8FLAG parameter that was previously on x/zviparm.

Arguments:

5.2.5 x/zvipcnt—Return the count of a parameter.

call xvipcnt(name, count)
status = zvipcnt(name, count);
x/zvpcnt returns the parameter size information for an interactive parameter whose name is passed in the NAMARG parameter.
If only two arguments are given, the actual count, or dimension of the parameter is passed back in COUNT.
If an error occurs, such as the parameter wasn't found, then COUNT is returned as 0, and the action specified by x/zveaction is taken.
x/zvipcnt may only be called after the user is prompted with x/zvintract.

Arguments:

5.2.6 x/zvipone—Interactive version of x/zvpone

status = xvipone(name, value, instance, maxlen) 
status = zvipone(name, value, instance, maxlen);
Interactive version of x/zvpone.
This routine returns a single value from a multi-valued interactive parameter. It is most useful to get a string from a list of strings without having to mess with string arrays, but can be used for integer or real (single-precision) values as well. Note that x/zvipone is a FORTRAN function with a status return, which differs from most FORTRAN RTL routines .

Arguments:

5.2.7 x/zvipstat—Interactive version of x/zvpstat

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.

Arguments:

5.2.8 x/zviptst—Interactive version of x/zvptst

GIVEN = xviptst ( KEY )
GIVEN = zviptst ( KEY ); 
The interactive version of x/zvptst. This function returns true if a key word was specified and false if not. For example, a program could check if the value “HALF” was given for a key word parameter with the code:
logical lhalf,xviptst

      lhalf = xviptst('HALF')
      if (lhalf) then
        .
        .
        .

The key word must be a value specified for a parameter of type KEY WORD.

xviptst must be declared LOGICAL in a FORTRAN program calling it.

x/zviptst, like the other x/zvi routines, may only be called after the user is prompted with x/zvintract.

Arguments:

5.2.9 x/zvp—Abbreviated version of x/zvparm

call xvp(name, val, count) 
status = zvp(name, val, count) 
x/zvp returns information about the value(s) specified for a parameter whenthe program was run, given a parameter name. It is an abbreviated version of x/zvparm, for user convenience. The returned information includes:
Both the parameter name and, if it is a character string, the value may be specified as CHARACTER*n type for FORTRAN or char for C.
For multivalued strings, the value should be a two-dimensional array of char (C) or an array of CHARACTER*n (Fortran). For C, the length of the inner dimension must be specified via the "length" parameter. If the length is 0, or a BYTE array is passed in Fortran, then the strings will be returned in the old x/zvsptr format, which has been deprecated and should no longer be used.
If an error occurs, such as the parameter wasn't found, then COUNT is returned as 0, and the action specified by x/zveaction is taken.

Arguments:

5.2.10 x/zvparm—Return a parameter value

call xvparm( namarg, valarg, count, def, maxcnt) 
status = zvparm( namarg, valarg, count, def, maxcnt, length) 
x/zvparm returns information about the value(s) specified for a parameter when the program was run, given a parameter name. The returned information includes:
Both the parameter name and, if it is a character string, the value may be specified as CHARACTER*n type for FORTRAN or char for C.
For multivalued strings, the value should be a two-dimensional array of char (C) or an array of CHARACTER*n (Fortran). For C, the length of the inner dimension must be specified via the "length" parameter. If the length is 0, or a BYTE array is passed in Fortran, then the strings will be returned in the old x/zvsptr format, which has been deprecated and should no longer be used.
If an error occurs, such as the parameter wasn't found, then COUNT is returned as 0, and the action specified by x/zveaction is taken.

Arguments:

5.2.11 x/zvparmd—Double-precision version of x/zvparm

call xvparmd(name, value, count, def, maxcnt) 
status = zvparmd(name, value,count, def, maxcnt, length);
Double-precision version of x/zvparm.
This routine is exactly like x/zvparm, except that if the parameter being returned is REAL, the VALUE parameter is returned in double precision format. x/zvparm returns the value in single precision. Although VALUE supports integers and strings as well, x/zvparmd should generally be used only for double-precision numbers. x/zvparm should be used for integers and strings.
This routine replaces the functionality of the R8FLAG parameter that was previously on x/zvparm.

Arguments:

5.2.12 x/zvpcnt—Return the count of a parameter.

call xvpcnt( namarg, count) 
status = zvpcnt( namarg, count) 
x/zvpcnt returns the parameter size information for a given parameter whose name is passed in the NAMARG parameter.
If an error occurs, such as the parameter wasn't found, then COUNT is returned as 0, and the action specified by x/zveaction is taken.

Arguments:

5.2.13 x/zvpone—Single value from a multivalued parameter

status = xvpone(name, value, instance, maxlen) 
status = zvpone(name, value,instance, maxlen);
This routine returns a single value from a multi-valued parameter. It is most useful to get a string from a list of strings without having to mess with string arrays, but can be used for integer or real (single-precision) values as well. xvpone is a FORTRAN function with a status return, which differs from most FORTRAN RTL routines .

Arguments:

5.2.14 x/zvpstat—Information about a parameter

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:

5.2.15 x/zvptst Indicate whether key word was specified

GIVEN = xvptst( key ) 
GIVEN = zvptst( key ); 
This function returns true if a key word was specified and false if not. For example, a program could check if the value “HALF” was given for a key word parameter with the code:
logical lhalf,xviptst

      lhalf = xviptst('HALF')
      if (lhalf) then
        .
        .
        .

The key word must be a value specified for a parameter of type KEYWORD. Note: Should be declared as a LOGICAL function in FORTRAN, as in the above example.

Arguments:


Up | Previous | Next | Title Page | Contents