next up previous
Next: PAR_GRMVx - Obtains from a parameter a vector of values each within a given range
Up: Reference Manual
Previous: PAR_GODD - Obtains an odd integer value from a parameter

    
PAR_GRM1x - Obtains from a parameter an exact number of values each within a given range

Description:
This routine obtains an exact number of values from a parameter. Each value must be within its own range of acceptable values supplied to the routine. Dynamic defaults may be defined.

This routine is particularly useful for obtaining co-ordinate information, where each co-ordinate has different bounds, and a series of calls to PAR_GDR0x would not permit an arbitrary number of dimensions.

Invocation:
CALL PAR_GRM1x( PARAM, NVALS, DEFAUL, VMIN, VMAX, NULL, VALUES, STATUS )

Arguments:
PARAM = CHARACTER * ( * ) (Given)
The name of the parameter.
NVALS = INTEGER (Given)
The number of values needed. Values will be requested until exactly this number (no more and no less) has been obtained.
DEFAUL( NVALS ) = ? (Given)
The suggested-default values for the parameter. No default will be suggested when any of the DEFAUL elements is not within the range of acceptable values defined by VMIN and VMAX for that value.
VMIN( NVALS ) = ? (Given)
The values immediately above a range wherein each obtained value cannot lie. Thus if VMAX is greater than VMIN, VMIN is the minimum allowed for the corresponding obtained value. However, should VMAX be less than VMIN, all values are acceptable except those between VMAX and VMIN exclusive.
VMAX( NVALS ) = ? (Given)
The values immediately below a range wherein each obtained value cannot lie. Thus if VMAX is greater than VMIN, VMAX is the maximum allowed for the corresponding obtained value. However, should VMAX be less than VMIN, all values are acceptable except those between VMAX and VMIN exclusive.
NULL = LOGICAL (Given)
NULL controls the behaviour of this routine when the parameter is in the null state. If NULL is .FALSE., this routine returns with STATUS=PAR__NULL. If NULL is .TRUE., the returned VALUE takes the value of DEFAUL and, if the MSG filtering level is `verbose', a message informs the user of the value used for the parameter. The routine then returns with STATUS=SAI__OK. This feature is intended for convenient handling of null values. NULL should only be set to .TRUE. when the value of DEFAUL will always give a reasonable value for the parameter.
VALUES( NVALS ) = ? (Returned)
The values associated with the parameter. If STATUS is returned not equal to SAI__OK, VALUE takes the values of DEFAUL.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:
  • There is a routine for each of the data types double precision, integer, and real: replace "x" in the routine name by D, I, or R respectively as appropriate. The DEFAUL, VMIN, VMAX, and VALUES arguments must have the corresponding data type.
  • If any of the values violates the constraints, the user is informed of the constraints and prompted for another vector of values. This is not achieved through the MIN/MAX system.



next up previous
Next: PAR_GRMVx - Obtains from a parameter a vector of values each within a given range
Up: Reference Manual
Previous: PAR_GODD - Obtains an odd integer value from a parameter

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