Date: Thu, 12 Mar 1998 11:02:41 +0100
References: <[log in to unmask]> <v0310280eb12b64011027@[128.183.200.180]>
X-Mailer: Z-Mail (3.2.1 15feb95)
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="PART-BOUNDARY=.19803121102.ZM1686.rz.uni-konstanz.de"
From: Otto Stolz <[log in to unmask]>
X-List: [log in to unmask]
X-Unsub: To leave, send text 'leave comp-fortran-90' to [log in to unmask]
Reply-To: Otto Stolz <[log in to unmask]>
Sender: [log in to unmask]
Precedence: list
Translation:
The following typical pitfalls must be avoided when coding NAG applicatio=
ns
in Fortran 77:
=2E..
=B7 An output argument of a function, or subroutine, invocation must not =
be
identical to any input argument of the same invocation.
Does this apply to function results, also? For instance, is the
result of the following defined by the standard?
INTERFACE
FUNCTION SCRAMBLE(A)
INTEGER, INTENT(IN), DIMENSION(:) :: A
INTEGER, DIMENSION(SIZE(A,1)) :: SCRAMBLE
END FUNCTION SCRAMBLE
END INTERFACE
INTEGER, DIMENSION(10) :: SOURCE
SOURCE = SCRAMBLE(SOURCE)
In this case, the function result is the same as a function argument.
Is that allowed? Is the result well defined?
thanks,
-robert ferrell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|