This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need some help here


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]