Problem with DOUBLE PRECISION and DBLE(integer)
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Dec 14 06:12:00 GMT 2006
On Thu, Dec 14, 2006 at 12:40:26AM +0200, Office wrote:
>
> The attempt to read a DOUBLE PRECISION variable 'Sek' from
> Zeit_String(5:10) with FORMAT (F6.3) yielded a similar result.
>
> Please let me know what may be the cause of this behaviour which makes
> gfortran useless for my astronomical programs.
What version of gfortran? Try 'gfortran --version'
This
program b
character(len=10) s
double precision x
s = '123456.789'
read(s(5:10),'(F6.3)') x
print *, x
end
gives
troutmask:sgk[270] gfc -o z b.f
troutmask:sgk[271] ./z
56.7890000000000
troutmask:sgk[272] gfc4x -o z b.f
troutmask:sgk[273] ./z
56.7890000000000
where gfc is 4.2.0 20060927 and gfc4x is 4.3.0 20061211.
--
Steve
More information about the Fortran
mailing list