next up previous
Next: Dynamic Defaults
Up: Cancelling Dynamic Values
Previous: Cancelling Dynamic Values

Range

Having set a minimum or a maximum value, you can alter its value by a further call to PAR_MINx or PAR_MAXx. Like a parameter itself, these control values remain in effect until the end of an application, or until they are cancelled. Therefore, should you no longer want either or both of the maximum and minimum limits, you must cancel them with PAR_UNSET. This routine's second argument is a comma-separated list which selects the values to reset.

In the following example parameter NX is obtained twice, first using a range, and then with no maximum limit and a different minimum.

    *  Get the integer value between 1 and 360.
          CALL PAR_MINI( 'NX', 1, STATUS )
          CALL PAR_MAXI( 'NX', 360, STATUS )
          CALL PAR_GET0I( 'NX', NX, STATUS )

    *  Cancel the parameter, as a minimum or maximum value cannot be set
    *  when the parameter is active, and because we want to obtain 
    *  another value.
          CALL PAR_CANCL( 'NX', STATUS )

    *  Set a new minimum value.
          CALL PAR_MINI( 'NX', NX, STATUS )

    *  Cancel the maximum value.
          CALL PAR_UNSET( 'NX', 'MAX', STATUS )

    *  Obtain a new value, with a new minimum and no maximum.
          CALL PAR_GET0I( 'NX', NX2, STATUS )

See Appendix [*] for details of the options for the second argument.



next up previous
Next: Dynamic Defaults
Up: Cancelling Dynamic Values
Previous: Cancelling Dynamic Values

PAR Interface to the ADAM Parameter System
Starlink User Note 114
Malcolm J. Currie
Alan J. Chipperfield
1999 September 24
E-mail:ussc@star.rl.ac.uk