RFA: Revamp fortran array types
N.M. Maclaren
nmm1@cam.ac.uk
Wed Aug 19 17:56:00 GMT 2009
On Aug 19 2009, Steve Kargl wrote:
>On Wed, Aug 19, 2009 at 06:43:13PM +0200, Toon Moene wrote:
>>
>> The following code is perfectly OK:
>>
>> DIMENSION A(10)
>> A = 10.0
>> CALL SUB(A,A)
>> END
>> SUBROUTINE SUB(A,B)
>> REAL, INTENT(IN) :: A(:), B(:)
>
>What happens if you replace the last line with
>
> REAL, INTENT(IN) :: A(:)
> REAL, INTENT(OUT) :: B(:)
No change. Not allowed. Try the following:
REAL, INTENT(IN), VALUE :: A(:)
REAL, INTENT(OUT) :: B(:)
Regards,
Nick Maclaren.
More information about the Fortran
mailing list