> If you're writing specific procedures for a generic, and you want to
> handle both precisions guaranteed by the standard, i.e., default real
> and double precision, it's not a good idea to use SELECTED_REAL_KIND(6)
> for one of them, and SELECTED_REAL_KIND(12) for the other one. On some
> platforms, these have the same kind type parameter, so your code won't
> even compile.
Right.
> > I would say that a Fortran programming "best practice" is to NEVER
> > declare something DOUBLE PRECISION.
>
> You might prefer not to use the words DOUBLE PRECISION, but there are
> good reasons to declare something to be double precision, maybe using
> KIND(0.0d0).
Although the KIND stuff has its place, KIND(0.0d0) IS exactly the same
thing as DOUBLE PRECISION, so I think it is clearer to write that.
|