>
> Is the following subroutine standard-conforming, with its declaration of a
> after it has been used to dimension b?
>
> SUBROUTINE fred(a,b)
> IMPLICIT NONE
> REAL :: b(a)
> INTEGER :: a
> PRINT *,b
> END SUBROUTINE fred
>
No. Lines 27-29 of page 96 of the standard say
A variable in a specification expression shall have its type and type
parameters, if any, specified by a previous declaration in the same
scoping unit, or by the implicit typing rules in effect for the scoping
unit, or by host or use association.
John Reid.
|