Re: Integer Coersion
- From: "David Frank" <dave_frank@xxxxxxxxxxx>
- Date: Wed, 07 Feb 2007 09:44:33 GMT
"PJH" <abc@xxxxxxxxxxx> wrote in message
news:12shvt6l0gun25f@xxxxxxxxxxxxxxxxxxxxx
"David Frank" <dave_frank@xxxxxxxxxxx> wrote in message
news:Lg5yh.21388$w91.9682@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"PJH" <abc@xxxxxxxxxxx> wrote in message
news:12sgvsvle6sr8c1@xxxxxxxxxxxxxxxxxxxxx
Also, has anyone any advice on how to check the number of bits in a
REAL
variable.
Paul Holden
nbits = sizeof(anything)*8
Thanks David. I was hoping to avoid non-standard intrinsics and
assumptions
about bits-per-byte. But I can't see any other way to do it, so I guess
this
is going to be my simplest solution.
Several points..
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 as
8bit entities) it follows
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 occurred
SINCE F90 was first approved.
.
- Follow-Ups:
- Re: Integer Coersion
- From: PJH
- Re: Integer Coersion
- References:
- Integer Coersion
- From: PJH
- Re: Integer Coersion
- From: David Frank
- Re: Integer Coersion
- From: PJH
- Integer Coersion
- Prev by Date: Re: Reading unknown number of values in unformatted file
- Next by Date: Re: Integer Coersion
- Previous by thread: Re: Integer Coersion
- Next by thread: Re: Integer Coersion
- Index(es):
Relevant Pages
|