Next: PAR_GODD - Obtains an odd integer value from a parameter
Up: Reference Manual
Previous: PAR_GETVx - Obtains a vector of values from a parameter regardless of the its shape
PAR_GEVEN
- Obtains an even integer value from a parameter
- Description:
This routine obtains a scalar integer value from a parameter.
This value must be even and within a supplied range of acceptable
values. A dynamic default may be defined.
- Invocation:
CALL PAR_GEVEN( PARAM, DEFAUL, VMIN, VMAX, NULL, VALUE, STATUS )
- Arguments:
-
PARAM = CHARACTER * ( * ) (Given)
-
The name of the parameter.
-
DEFAUL = INTEGER (Given)
-
The suggested-default value for the parameter. No default
will be suggested when DEFAUL is not within the range of
acceptable values defined by VMIN and VMAX, or DEFAUL is odd.
-
VMIN = INTEGER (Given)
-
The value immediately above a range wherein the obtained
value cannot lie. Thus if VMAX is greater than VMIN, VMIN
is the minimum allowed for the obtained value. However,
should VMAX be less than VMIN, all values are acceptable
except those between VMAX and VMIN exclusive.
-
VMAX = INTEGER (Given)
-
The value immediately below a range wherein the obtained
value cannot lie. Thus if VMAX is greater than VMIN, VMAX
is the maximum allowed for the 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.
-
VALUE = INTEGER (Returned)
-
The value associated with the parameter. If STATUS is returned
not equal to SAI__OK, VALUE takes the value of DEFAUL.
-
STATUS = INTEGER (Given and Returned)
-
The global status.
- Notes:
-
Zero is deemed to be even.
-
If the value violates the constraint, the user is informed of
the constraint and prompted for another value.
Next: PAR_GODD - Obtains an odd integer value from a parameter
Up: Reference Manual
Previous: PAR_GETVx - Obtains a vector of values from a parameter regardless of the its shape
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