C HDS data types

HDS recognises a selection of primitive data types which correspond to Fortran data types but have names prefixed by an underscore. The correspondence between Fortran types and HDS data types is as follows:



HDS Type VAX FORTRAN Type


_INTEGER INTEGER
_REAL REAL
_DOUBLE DOUBLE PRECISION
_LOGICAL LOGICAL
_CHAR[*n] CHARACTER*n
_UBYTE BYTE
_BYTE BYTE
_UWORD INTEGER*2
_WORD INTEGER*2


For example, a variable declared as REAL in a program has HDS type ’_REAL’. It is necessary to appreciate that if the data type is an argument in a routine then that argument should be ’_REAL’ rather than ’REAL’. For example:

        CALL NDF_MAP (NDF, ’Data’, ’_REAL’, ’UPDATE’, PTR, NELM, STATUS)

N.B. HDS structures also have a type, although this is purely descriptive. For example, the type of an axis structure in an NDF is AXIS. The only restriction on the names of structure types is that they must not begin with an underscore (to distinguish them from primitive data types).