Re: passing only the real parts of a complex array to a function




"Kamaraju Kusumanchi" <kk288@xxxxxxxxxxx> wrote in message
news:e2odu9$51r$1@xxxxxxxxxxxxxxxxxxxxxxx
subroutine increment(p)
implicit none
real(DP), intent(inout) :: p(3) <----------------------
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


.



Relevant Pages

  • Re: URGENT - VB.Net app and Wireless...
    ... Your news reader should allow you to find it. ... strength query, and a sample program. ... VS.NET 2003 and compile it, it will compile both the class library and the ... > Thanks for the swift reply Paul. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: using a list in VC++ v6
    ... sorry forgot about the std:: prefix. ... I have this sample program ... int main ... Which doesn't compile. ...
    (microsoft.public.vc.stl)
  • sample stack programm
    ... I?m trying to translate a borland pascal sample program to gpcp. ... "Sys.Console.WriteLine;" does not compile. ... VAR myStack: Col.Stack; ... VAR myEnumerator: Col.IEnumerator; ...
    (comp.lang.oberon)
  • Re: Delphi 5 variant compilation problem
    ... > I am trying to compile a sample program that is based on the ... > OpenOffice.org software platform. ... > trying to compile is that variants.dcu wasn't found. ... Delphi 5 didn't ...
    (comp.lang.pascal.delphi.misc)
  • Re: Performance problem with _SECURE_SCL=0
    ... but the result is the opposite. ... I wrote the following sample program: ... Can you supply a complete example that anyone can compile - for ... what's the StopWatch definition you're using? ...
    (microsoft.public.vc.stl)