double confusion
- From: "Julian Bessenroth" <jbusenet@xxxxxx>
- Date: 17 Jul 2006 02:46:54 -0700
I can't see the tree for the wood ...
my listing:
program bcont
double precision c
double precision a /2.0/
double precision b /2.0/
c=r(a,b)
write(*,*) 'result = ',c
stop
end
double precision function r(m,t)
double precision m
double precision t
r = m*t
c write(*,*) 'm = ',m,' t = ',t,' m*t= ',r
return
end
Within the function the print returns the correct result (2*2=4), but
in the main program the result seems to be 2.25000 ???
What the ? Sure, I've not written in fortran 77 (!) for a while, but I
feel myself like being a complete newbie.
Anybody a hint?
TIA
Julian
.
- Follow-Ups:
- Re: double confusion
- From: Brooks Moses
- Re: double confusion
- From: michael
- Re: double confusion
- Prev by Date: Re: recl on g95 and gfortran
- Next by Date: Re: double confusion
- Previous by thread: writing output listing onto screen (or not) and onto file
- Next by thread: Re: double confusion
- Index(es):
Relevant Pages
|
|