Re: passing only the real parts of a complex array to a function
- From: "Michael Metcalf" <michaelmetcalf@xxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 19:19:50 GMT
"Kamaraju Kusumanchi" <kk288@xxxxxxxxxxx> wrote in message
news:e2odu9$51r$1@xxxxxxxxxxxxxxxxxxxxxxx
subroutine increment(p)real(DP), intent(inout) :: p(3) <----------------------
implicit none
p(:) = p(:) + 1.0_DP
end subroutine increment
end program complex_array
This sample program is missing the intent attribute for p. When added, it
doesn't compile. This is because you're passing an expression to increment,
not a variable. Perhaps the only way out is to cheat by using equivalence of
temp(2,3) to b, and pass temp(1,:) and temp(2,:)?
Regards,
Mike Metcalf
.
- References:
- passing only the real parts of a complex array to a function
- From: Kamaraju Kusumanchi
- passing only the real parts of a complex array to a function
- Prev by Date: Re: passing only the real parts of a complex array to a function
- Next by Date: Re: "GOTO considered harmful" considered harmful. Re: New style DO syntax?
- Previous by thread: Re: passing only the real parts of a complex array to a function
- Next by thread: Newbie making a dumb mistake but can you help?
- Index(es):
Relevant Pages
|