Hello,
Yes, consider
real( double_k) :: pi = 3.1415926_double_k
The "_double_k" on the literal is necessary
to get a double_k value. Otherwise, it's
a default real value, which may not be double_k.
Robert Kernell wrote:
>
> Hi. I am teaching a Fortran class and I was wondering...
>
> Is there any use for specifying kinds for constants?
>
> Bob Kernell
> Research Scientist
> Surface Validation Group
> Atmospheric Sciences Competency
> Analytical Services & Materials, Inc.
> email: [log in to unmask]
> tel: 757-827-4631
--
Cheers!
Dan Nagle
Purple Sage Computing Solutions, Inc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|