[fitsbits] 64-bit integers

Andreas Wicenec awicenec at eso.org
Wed May 4 15:24:52 EDT 2005


Hi Clive,

at least for HP there is no problem here:

http://docs.hp.com/en/5966-9887/ch02s03.html

and for other systems (e.g. Cray T90) the 64bit integers are even  
default,
i.e. if you define a variable as integer without any kind parameter it  
will
be a 64bit integer (see  
http://docs.cray.com/books/007-3692-003/html-007-3692-003/ 
fvbalchri.html)

Actually the Fortran standard does allow, but does not require any  
'kind' parameter, thus even
INTEGER*2 or INTEGER*4 are not 'valid' Fortran to follow your wording.

Andreas


On 04.05.2005, at 19:38, Clive Page wrote:

> On Wed, 4 May 2005, Eric Greisen wrote:
>
>> In testing for aips implementation I discovered that the HP Fortran
>> compilers will not accept INTEGER*8 but the the IBM (Mac), GNU (Linux)
>> and SUN (Solaris Ultra) all accept that statement and do the right
>> things.
>
> Just in case everybody doesn't know this, can I point out that  
> INTEGER*8
> isn't (and has never been) valid Fortran, just a fairly common  
> extension
> to the various standards.  So it may be that HP Fortran really doesn't
> support 64-bit integers, but a better test would be to try something  
> like
>
>   integer(kind=selected_int_kind(16)) :: variable
>
> and see if that compiles [the '16' is the number of decimal digits
> to be supported].
>
> -- 
> Clive Page
> Dept of Physics & Astronomy,
> University of Leicester,    Tel +44 116 252 3551
> Leicester, LE1 7RH,  U.K.   Fax +44 116 252 3311
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.cv.nrao.edu
> http://listmgr.cv.nrao.edu/mailman/listinfo/fitsbits




More information about the fitsbits mailing list