Next: Example
Up: The Parameter Specification
Previous: Prompt Control Fields
The TYPE Field
This field specifies the type of the parameter.
This field is used by the system to determine the type of storage to be
used for the parameter and its default values, etc.
If a primitive value of a different type is supplied,
it will be converted to the specified type for storage if possible.
If conversion is not possible, an error is reported.
It is important to distinguish between the type of the parameter and the type
of the value to be obtained from it by the program.
The field is of the form:
TYPE datatype
where datatype is a character string giving the required type of the
parameter.
datatype may be:
- A `standard' HDS primitive type (i.e. _INTEGER, _REAL, _DOUBLE, _LOGICAL,
_CHAR).
- LITERAL - formerly used to specify that the parameter is of type _CHAR
and to force the parameter system to accept unquoted character strings as
character values rather than HDS object names.
This is now the standard behaviour for parameters of type _CHAR so datatype
LITERAL is no longer required.
- A `user-defined' type (IMAGE, SPECTRUM etc.).
- UNIV - used by convention when the parameter type is unimportant.
Actually this is treated the same as other `user-defined' types.
Parameter storage corresponding with the type of the value given will be
created.
- A `facility-recommended' type (TAPE for MAG, FILENAME for FIO etc.).
These are used by convention - actually any user-defined type will do.
If the TYPE field is omitted, type UNIV is assumed.
Notes:
- 1.
- Internally only the `standard' primitive types (_LOGICAL, _INTEGER,
_REAL, _CHAR, _DOUBLE) are differentiated - all other types are treated
the same.
- 2.
- Only values of the standard types, or names, can be given in the
Interface File or as parameter values at run time.
- 3.
- The dimensionality of parameters is not declared in the
Interface File, but is defined by the value given at run time.
The given dimensionality must be acceptable to the program
(e.g. when it does a call to PAR_GETnx).
- 4.
- The PAR_GETnx/_PUTnx routines only GET/PUT values of the
standard HDS types -
other types have to be handled by calls to the appropriate facility_ASSOC
routine (DAT_ASSOC for example).
Where primitive values are being handled, conversion between the value type
and the storage type will be performed if necessary and possible.
Next: Example
Up: The Parameter Specification
Previous: Prompt Control Fields
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