revap types, step 1

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Aug 27 02:27:00 GMT 2004


On Thu, Aug 26, 2004 at 07:12:58PM -0700, Ron Young wrote:
> 
> 
>  Remember real*8, -r8, real*16, -r16 are the number of bytes used to store
> that data type. If a given machine is not byte addressable ,then
> logical*1,logical*4,integer*1,integer*2 and maybe integer*4 don't make
> since. Equivalence statements and remapping common is always possible if all
> these data types are supported. I think that you should take care of byte
> addressable machines and all others should take their chances.
> 

Well, technically real*4, real*8, and real*16 are not 
part of the Fortran language.  Never have been, never
will be.  However, they are de facto extensions that
many people associate with the amount of memory in bytes
that the type requires.    

Now, to your assertation that "logical*1, logical*4,
integer*1, integer*2 and maybe integer*4 don't make
since [sic]" on non-byte addressable machines, you
need to read about KIND type parameters.  These permit
you to distinguish between the various data types.  For
example, NAG's compiler has REAL(KIND=1), REAL(KIND=2)
and REAL(KIND=3) to distinguish between REAL, DOUBLE
PRECISION and QUAD PRECISION.

-- 
Steve



More information about the Fortran mailing list