(Nit-picking:)
As a matter of programming style, I think I'd use explicit type
conversion instead of mixed-type assignment for the function argument:
...
real :: b
integer :: ia
do ia = 1, 5
b = f (real (ia))
write (*, *) b
end do
...
also you might want some type parameters in the declaration for b and in
the explicit conversion to real. I guess default integer is OK for the
do index.
=
Loren P Meissner
We've moved to:
1152 Westwood Dr; San José CA 95125
- Email address won't change.
- New phone at Westwood Dr: (408) 723-3061
Loren's Cell (no change): (408) 761-0548
= =
Meissner Family website:
www.meiszen.net
Check it out!
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf
Of Alberto Fasso'
Sent: Saturday, August 23, 2003 10:43 AM
To: [log in to unmask]
Subject: Re: about global variables...I suppose
[...]
Just use integers:
real :: a,b
integer :: ia, ib
do ia=1,5
a=ia
b=f(a)
write(*,*) b
enddo
Alberto Fassò
--
Alberto Fassò
SLAC-RP, P.O. Box 4349, MS 48, Stanford CA 94309
Phone: (1 650) 926 4762 Fax: (1 650) 926 3569
[log in to unmask]
|