Re: Rounding off double precision
- From: "Les" <l.neilson@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Mar 2008 17:45:41 +0100
"Bamm" <bammster@xxxxxxxxx> wrote in message
news:eab4fbe9-3cf4-4015-9a87-e5e9a872f808@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Sigh. The text you quoted above reads "creates a literal constant
with the double-precision value". The literal constant is
"3.141592653589793238d0" and is a double precision value. The fact
that it is being assigned to a single-precision parameter is something
different. A parameter is not a literal constant and vice-versa.
So how do you declare a constant in Fortran? I thought parameter was
the way constants were defined in Fortran, but if there is a better
way, I'd like to try it.
you would use something like :
double precision, parameter :: PI = 3.14159.......d0
integer, parameter :: ITYPE = 1
and so on
Les
.
- Follow-Ups:
- Re: Rounding off double precision
- From: Dave Seaman
- Re: Rounding off double precision
- References:
- Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: Richard Maine
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: e p chandler
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: glen herrmannsfeldt
- Re: Rounding off double precision
- From: Charles Coldwell
- Re: Rounding off double precision
- From: glen herrmannsfeldt
- Re: Rounding off double precision
- From: Chip Coldwell
- Re: Rounding off double precision
- From: Dave Seaman
- Re: Rounding off double precision
- From: Chip Coldwell
- Re: Rounding off double precision
- From: Bamm
- Rounding off double precision
- Prev by Date: Re: data with metadata
- Next by Date: gfortran problem
- Previous by thread: Re: Rounding off double precision
- Next by thread: Re: Rounding off double precision
- Index(es):
Relevant Pages
|
|