Previous: Subroutine Names
Up: Basic FITSIO Conventions
Next: Implicit Data Type Conversion
Previous Page: Subroutine Names
Next Page: Implicit Data Type Conversion

Subroutine Families

Many of the subroutines come in families which differ only in the datatype of the associated parameter(s) . The datatype of these subroutines is indicated by the last letter of the subroutine name (e.g., 'j' in 'ftpkyj') as follows:

x - bit
        b - character*1 (unsigned byte)
        i - short integer (I*2)
        j - integer (I*4)
        e - real exponential floating point (R*4)
        f - real fixed-format floating point (R*4)
        d - double precision real floating-point (R*8)
        g - double precision fixed-format floating point (R*8)
        c - complex reals (pairs of R*4 values)
        m - double precision complex (pairs of R*8 values)
        l - logical (L*4)
        s - character string
Notes: Some Fortran compilers support a byte datatype such as INTEGER*1, LOGICAL*1, or BYTE, which can sometimes be used instead of CHARACTER*1 variables. Some machines permit passing a numeric datatype (such as INTEGER*1) to the FITSIO subroutines which are expecting a CHARACTER*1 datatype, but this is not supported on all machines (e.g., on a VAX/VMS machine one must use the VAX-specific %DESCR function). It is also important to remember that FITS always interprets the byte value as an unsigned byte (values ranging from 0 to 255).

The double precision complex datatype is not a standard Fortran-77 datatype. If a particular Fortran compiler does not directly support this datatype, then one may instead pass an array of pairs of double precision values to these subroutines. The first value in each pair is the real part, and the second is the imaginary part.

asterix@space.starlink
Wed Feb 16 08:18:45 GMT 1994