FITS long integer support (was Re: [fitsbits] ADASS FITS BoF on Sunday)

Eric Greisen egreisen at nrao.edu
Fri Oct 22 14:21:55 EDT 2004


Peter Teuben writes:
 > > I'm less clear about long integer support in Fortran.  Fortran 90/95 I 
 > > believe does support this, but I don't recall seeing support for integer*8 
 > > in Fortran 77 (it is certainly not part of ANSI standard Fortran-77).  So 
 > > this may boil down to a language divide: C/C++, Java, Fortran-90, and 
 > > probably most other new languages naturally support long integers, but 
 > > Fortran-77 doesn't.
 > 
 > indeed, there is no official support, since integer*8 isn't in the standard.  
 > However, both the intel and gnu compiler support it, and I abuse this feature
 > (with caution). I also recall the Cray compiler used to have a flag to the
 > compiler that made floats become double's essentially, so something in this
 > direction may be implemented by compiler writers.

Fortran 77 defines INTEGER, LOGICAL, and REAL to be all of the same
length and does not define that length.  Some implementations do allow
one to declare all of them to 8 bytes, but usually that would only be on
64-bit computers.  DOUBLE PRECISION is twice as long.

ERic Greisen



More information about the fitsbits mailing list