next up previous
Next: Setting Component Types
Up: ARRAY COMPONENT TYPES
Previous: Complex Values

Full Type Specifications  

The combination of the seven numeric types and a complex value flag gives rise to a further seven complex types, which are conveniently expressed by prefixing the character string `COMPLEX' to the numeric type, as follows:

'COMPLEX_DOUBLE'
'COMPLEX_REAL'
'COMPLEX_INTEGER'
'COMPLEX_WORD'
'COMPLEX_UWORD'
'COMPLEX_BYTE'
'COMPLEX_UBYTE'

Strings such as these, which represent both the numeric type and the complex value flag, are termed the full type specification of an NDF's array component. Note that a string such as `_REAL' can also be considered as a special case of a full type specification in which the ``complex'' field is blank.

The full type of an array component can be derived if necessary, but the routine NDF_FTYPE will return it directly. For instance:

      INCLUDE 'NDF_PAR'
      CHARACTER * ( NDF__SZFTP ) FTYPE

      ...

      CALL NDF_FTYPE( INDF, 'Data', FTYPE, STATUS )

will return the full type of an NDF's data component as an upper-case character string via the FTYPE argument. Note how the symbolic constant NDF__SZFTP (defined in the include file NDF_PAR) should be used to declare the size of the character variable which is to receive the returned full type specification.

As might be expected, NDF_FTYPE will also accept a list of array components, returning a full type specification which combines the numeric types and the complex value flags of the individual components in the same way as the routines NDF_TYPE and NDF_CMPLX would have done individually. Thus:

      CALL NDF_FTYPE( INDF, 'Data,Variance', FTYPE, STATUS )

will combine the full type specifications of both the data and variance components of an NDF, and return the resultant string.



next up previous
Next: Setting Component Types
Up: ARRAY COMPONENT TYPES
Previous: Complex Values


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils