- #1
freja
- 7
- 0
I have a very simple question, but have been unable to find an answer for it. When using fortran 90 can you use a DO loop to calculate a complex number? For example:
Code:
COMPLEX FUNCTION forwards (tincdum,tstartdum,tenddum,fdum,ydum,idum,wdum&
&,lamdadum)
IMPLICIT NONE
REAL, INTENT(IN):: tincdum,tstartdum,tenddum,wdum,lamdadum,ydum,idum
COMPLEX, INTENT(IN):: ydum,idum
COMPLEX:: fn
DO ydum = tstartdum,tenddum,tincdum
fn = fofy(idum,wdum,lamdadum,ydum,fn)
ydum = ydum + tincdum*fn
END DO
forwards = ydum
END FUNCTION forwards
[code/]
Thank you