next up previous 63
Next: Example
Up: The Parameter Specification
Previous: Run-time Modification of VPATH Action


The RANGE Field

This field is used to specify a range of permitted values for the parameter. The RANGE values will also be used if MIN or MAX is specified as the parameter value in the absence of any dynamic minimum or maximum values set by the program.

RANGE can only be specified for parameters of standard primitive type other than _LOGICAL, and is only relevant if the parameter value is a scalar. A RANGE field will also constrain any dynamic minimum or maximum values which the program may set.

A parameter cannot have both a RANGE and an IN field and RANGE cannot be specified before TYPE has been declared.

Range checking is carried out when a program attempts to get the value of a parameter or set a minimum or maximum value. No range checking occurs when putting a value. For _CHAR parameters, all values are converted to upper case for checking and the ASCII collating sequence is used.

If the constraints are violated, the system reports the error and, if the violation was on getting a parameter value, prompts for another value unless the parameter had VPATH INTERNAL, in which case status SUBPAR__OUTRANGE is returned.

The field is of the form:

RANGE min, max
where min and max are two character or number constants specifying the minimum and maximum values for the parameter - the values must be convertible to the type of the parameter.

If min > max, the value must not lie between them. The values themselves are always acceptable.





next up previous 63
Next: Example
Up: The Parameter Specification
Previous: Run-time Modification of VPATH Action

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