Renchi Raju said:
> main program:
> integer :: a(10)
> call mysub(a(2:))
[...]
> case a:
> subroutine mysub(b)
> integer :: b(8)
> ....
Yes, this is fine.
> case b:
> subroutine mysub(b)
> integer :: b(10)
> ..
No, this is not valid.
The standard requires that an actual array argument is at least as big
as the dummy array.
The NAG compiler detects this at compile time if the subroutine
and main program are both in the same file, and can detect it at
runtime with the -C=calls option.
Cheers,
--
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
([log in to unmask])
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|