Re: End of record marker - 32 vs. 64 bit
- From: "Steve Lionel" <steve.lionel@xxxxxxxxx>
- Date: 28 Feb 2007 14:01:58 -0800
I want to reiterate a point I made earlier that you may have
overlooked. In your initial post, you made a common assumption that
on a "64-bit" system, integers are automatically twice the size they
are on a 32-bit system. That is not so. The "64-bit" nature refers
to the size of a virtual address. Such systems do tend to also have a
native 64-bit integer type and such a type is typically available for
use in Fortran compilers for those systems, but in every case I know
of, a "default integer" is still 32 bits. That also goes for "default
real" - that too remains 32 bits.
This can pose some problems when you're dealing with size entities, as
an object can have a size in bytes that is larger than 2**32, so you
may need to be careful when coding. Fortran 2003 adds KIND=
specifiers to intrinsics such as LEN that might want to return values
larger than a default integer can hold.
In addition, if your application uses extensions such as "Cray
POINTER" or interoperates with C, you need to take care that the
variables holding addresses are not restricted to default integer
size.
Steve
.
- References:
- End of record marker - 32 vs. 64 bit
- From: Chris Theis
- Re: End of record marker - 32 vs. 64 bit
- From: Steve Lionel
- Re: End of record marker - 32 vs. 64 bit
- From: Chris Theis
- End of record marker - 32 vs. 64 bit
- Prev by Date: Re: IBM XL Fortran
- Previous by thread: Re: End of record marker - 32 vs. 64 bit
- Next by thread: Re: End of record marker - 32 vs. 64 bit
- Index(es):