Re: increasing width
- From: "Steve Lionel" <steve.lionel@xxxxxxxxx>
- Date: 10 Mar 2007 14:43:04 -0800
On Mar 10, 5:00 pm, "Lane Straatman" <inva...@xxxxxxxxxxx> wrote:
The error is from the line:
real(8) :: total, term
, which I get every time I want to declare real(8). The warning that it
issues would seem to point to the way out. How do I make a real variable
with 'SELECTED_REAL_KIND(6,37)'?
A hard-coded KIND specifier, which the (8) is, is non-portable, Most
Fortrans use kind 8 for double precision but not all. What your
compiler helpfully recommends is this:
real(KIND=SELECTED_REAL_KIND(6,37)) :: varname
This says "give me the kind of REAL that has at least 6 decimal digits
of precision and a range of at least 10**+-37" It is portable to any
Fortran 90 or later implementation.
Steve
.
- Follow-Ups:
- Re: increasing width
- From: Lane Straatman
- Re: increasing width
- References:
- increasing width
- From: Lane Straatman
- increasing width
- Prev by Date: Re: increasing width
- Next by Date: Re: increasing width
- Previous by thread: Re: increasing width
- Next by thread: Re: increasing width
- Index(es):
Relevant Pages
|