Re: Integer Coersion
- From: "PJH" <abc@xxxxxxxxxxx>
- Date: Wed, 7 Feb 2007 10:41:50 -0000
David, is that your surname or just a description of your debating style? I
actually pretty much agree with you about the byte thing. Coming to Fortran
from byte oriented languages such as Delphi, all this KIND thing seems very
odd - dare I say bordering on unnecessary 99.9% of the time. I could accept
it more readily if there were better "standard" mechanisms (like sizeof and
a BYTE type) available to work with both. Even being able to define types
based on minimum bit length would be an improvement.
However, "When in rome..." and as this is Fortran not Delphi, I feel I
should at least try to play by the local rules and produce code that is
vaguely standard conforming.
Paul Holden
ps
Someone around here is going to get hot under the collar with you for saying
that INTEGER(1) implies 1 byte, rather than INTEGER*1. I'm sure there
actully are some compilers out there that deliberately don't have a
KIND=BYTE equivalence.
David Frank wrote
Several points..as
1. Your compiler (IVF) supports SIZEOF as do several others including my
CVF compiler.
2. Its amazing to me that people are bending their syntactic noses out of
shape to allow a memory byte
to be other than 8bits when cheap memory came on the scene and BURIED
those mfg's computers
models that didnt support it..
3. Since 2 is true, (ALL memory today is organized/addressed by hardware
8bit entities) it followsoccurred
that AFAIK no compiler being sold today doesnt recognize the 1 byte
integer declaration,
INTEGER(1) :: one_byte
and those that support quad precision (intel, ibm, et al) support bytes
as the de-facto standard for reals also
REAL(4) :: x
REAL(8) :: y
REAL(16) :: z
IOW, BYTES RULE!! screw those that try to jam KIND syntactic
horrors down our collective throats
ignoring the recent standardization of physical memory that has
SINCE F90 was first approved.
.
- Follow-Ups:
- Re: Integer Coersion
- From: Brooks Moses
- Re: Integer Coersion
- From: Richard Maine
- Re: Integer Coersion
- From: mecej4
- Re: Integer Coersion
- From: Gary Scott
- Re: Integer Coersion
- References:
- Integer Coersion
- From: PJH
- Re: Integer Coersion
- From: David Frank
- Re: Integer Coersion
- From: PJH
- Re: Integer Coersion
- From: David Frank
- Integer Coersion
- Prev by Date: Re: Integer Coersion
- Next by Date: Re: Reading unknown number of values in unformatted file
- Previous by thread: Re: Integer Coersion
- Next by thread: Re: Integer Coersion
- Index(es):
Relevant Pages
|
|