next up previous 63
Next: Example
Up: The Parameter Specification
Previous: Example


The VPATH Field

This field is used to specify the way in which a value is obtained for a parameter if the user does not specify a value (on the command line, or by an ICL SEND SET command, for example) before it is required by the program. In that case, there are several potential sources for parameter values and different applications will want to use different sources for their various parameters.

The VPATH field is the means whereby this order of searching for parameter values is specified.

The field is of the form:

VPATH  value-resolution-path
where value-resolution-path is a character string which gives a path used for searching for a parameter value. It consists of a set of path specifiers. If there are two or more path specifiers, they must be separated by commas and the string must be enclosed in single quotes.

The valid specifiers are:

CURRENT
Use the current (last-used) value of the parameter. (See Section [*] for more information on the current value.)
DYNAMIC
Use the dynamic default value specified by the program. Dynamic defaults are set by the program calling a subroutine such as PAR_DEFnx or DAT_DEF specifying the required values.
DEFAULT
Use the static default specified in the Interface Module (see Section [*]).
GLOBAL
Use the value of the associated parameter (see Section [*], The ASSOCIATION Field).
PROMPT
Prompt the user and obtain a value. (See also Section [*], The PPATH Field.) There is an implied PROMPT at the end of every VPATH. Note that PROMPT will always give a result to the program, even if it is a bad status, therefore PROMPT only makes sense as the last thing on the path.
NOPROMPT
Give up trying to get a value and return status PAR__NULL. This only makes sense as the last specifier in the path and will prevent a prompt being issued as a last resort if the value-resolution-path is exhausted.
INTERNAL
This specifier can only be used as the first and only specifier on the VPATH. A value-resolution-path of 'DYNAMIC,CURRENT,NOPROMPT' is implied4. `Internal' storage will be used to hold the parameter values. Scalar values are stored in memory to give enhanced performance; array values are stored in the parameter file.

If the value for a parameter has not been specified when it is required, the system looks at the VPATH specification, picks out the first path specifier and tries to find a value from this source. If a value is not found, the next path specifier is extracted and another search is made. This process continues until a value is found, the specifier is NOPROMPT or the path specification runs out. If the path specification is exhausted, the user is prompted for a value.

Note that the VPATH field is only used the first time a parameter value is obtained. If the parameter is cancelled before another attempt to `get' a value, a prompt will be issued, even if NOPROMPT is put on the VPATH. If the parameter is not cancelled, the existing value will be returned again.

If the VPATH field is omitted, VPATH PROMPT is assumed.





next up previous 63
Next: Example
Up: The Parameter Specification
Previous: Example

ADAM Interface Module Reference Manual
Starlink User Note 115
A J Chipperfield, B D Kelly, S L Wright
3 September 2002
E-mail:ussc@star.rl.ac.uk

Copyright © 2002 Council for the Central Laboratory of the Research Councils