Message from discussion
how to declare doubles in f95
Path: g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Larry Gates <la...@example.invalid>
Newsgroups: comp.lang.fortran
Subject: Re: how to declare doubles in f95
Date: Thu, 29 Jan 2009 21:30:13 -0700
Lines: 30
Message-ID: <19heczwivmn3g.v1ya0sr3ezbd.dlg@40tude.net>
References: <0b898c8f-5866-4942-bf2b-171655d6658a@r15g2000prh.googlegroups.com> <1iu9kv0.1bz1pn5whvfi8N%nospam@see.signature> <1nw9yyz9qhd9p.1hjp1zbzhjv22$.dlg@40tude.net> <1iu9ut8.eu0q92m2gmncN%nospam@see.signature> <211848d9p01u$.s5az6kged1ru$.dlg@40tude.net> <1iua0ko.lz5o02c9847kN%nospam@see.signature>
Reply-To: la...@example.invalid
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Nwhepp1YhzaKv45ceCZ3wwh1TaAkOiMv+Oh+Ula/RhSEFripG3
Cancel-Lock: sha1:gInH8NUKxV9ZBr85K7kEaGx+Rcc=
User-Agent: 40tude_Dialog/2.0.15.1
On Wed, 28 Jan 2009 23:37:04 -0800, Richard Maine wrote:
>> But what does it avail you to have dp if you don't
>> have the tag to hang on your constants?
>
> I don't understand your comment about not having a "tag to hang on your
> constants." It sounds like you don't think you can portably determine
> the appropriate kind value for double precision. On the contrary, that
> is trivial to do. See the kind intrinsic. Kind(0.0d0) is the idiomatic
> way to determine that kind value.
What I meant here is if you declare
double precision xx
as opposed to
integer, parameter :: dp = selected_real_kind(12,30)
real(kind=dp) :: xx
then you don't have _dp to hang on your constants, which I greatly prefer
to the dO in its stead. I appear to have a different imagination than you,
one that avoids things that look like dO, in particular because the 0 and O
keys are adjacent.
--
larry gates
It's certainly easy to calculate the average attendance for Perl
conferences.
-- Larry Wall in <199710071721.KAA19...@wall.org>