This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Need some help here
- From: François-Xavier Coudert <Francois-Xavier dot Coudert at lcp dot u-psud dot fr>
- To: gfortran <fortran at gcc dot gnu dot org>
- Cc: Jerry DeLisle <jvdelisle at verizon dot net>
- Date: Thu, 25 Nov 2004 10:06:25 +0100
- Subject: Re: Need some help here
- Organization: Laboratoire de Chimie Physique
- References: <1101372424.4064.20.camel@localhost.localdomain>
Hi all,
h=0.1_wp
I'm not very good in variable kinds details, but I was taught to let the
compiler alone: if h is declared as real(kind=wp), h=0.1 should work OK. Can
someone confirm this?
function fn(x,y)
fn=4.0_8 * x / y - x * y
end function
Declare the type of your function and arguments, and don't hardcode the kind
of "4.0_8". Take care, since wp is not defined outside the main program, so
you probably can't use it here.
FX
--
Free speech is the right to shout 'Theater' in a crowded fire. (Yippie
Proverb, quoted by Fortune)