next up previous 203
Next: Creating Objects
Up: HDSPAR - HDS Parameter Routines
Previous: Associating with an Object


Parameter States

A parameter has a number of states. Initially, a parameter has no value, and is said to be in the ground state. When the parameter has been given a value, the parameter moves to the active state. A parameter acquires a value in the first instance by looking for one supplied on the command line. Failing that, when the program requests a parameter value, the parameter system will attempt to get a value from one of a number of sources specified by the VPATH Field in the Interface Module (see SUN/115). This may cause the user to be prompted and the prompt may contain a suggested value which can be accepted by just hitting the RETURN key.

If a program requests a value for a parameter already in the active state, the existing value is returned. To obtain a new value the program must first cancel the parameter, moving it to the cancelled state. DAT_CANCL does this as well as annulling the associated locator.

When the application gets a value for a cancelled parameter the VPATH Field is ignored and the user prompted. When a value is obtained, the parameter returns to the active state.

The parameter may also go into the null state. This occurs if the parameter is given the null value, for example by the user entering ! in response to a prompt. When the parameter is in the null state, any attempt to get its value will return status PAR__NULL - it must be cancelled before another value can be obtained.



next up previous 203
Next: Creating Objects
Up: HDSPAR - HDS Parameter Routines
Previous: Associating with an Object

HDSPAR - HDS Parameter Routines
Starlink User Note 224
A J Chipperfield
10 February 2000
E-mail:ussc@star.rl.ac.uk

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