The Intel Fortran compiler version 2017.0.098 gets this right,
but the previous version does not.
On Mon, 29 May 2017, Malcolm Cohen wrote:
> Date: Mon, 29 May 2017 18:02:15 +0900
> From: Malcolm Cohen <[log in to unmask]>
> Reply-To: Fortran 90 List <[log in to unmask]>
> To: [log in to unmask]
> Subject: Re: Was implied-shape introduced in f2008?
>
> Yes implied-shape is new in F2008, from the Introduction:
> "A named constant array's shape can be implied by its value."
>
> Cheers,
> --
> ..............Malcolm Cohen, NAG Oxford/Tokyo.
>
> -----Original Message-----
> From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of Anton Shterenlikht
> Sent: Monday, May 29, 2017 5:45 PM
> To: [log in to unmask]
> Subject: [COMP-FORTRAN-90] Was implied-shape introduced in f2008?
>
> integer, parameter :: j(*) = (/ 3, 4, 7 /) end
>
> I think this is a f2008 conforming program, where j is an implied-shape array named constant, 8.5.8.6 of f2015 CD.
> Is that correct?
>
> One of my compilers reject this with
> "Illegal use of symbol j - a named constant array must have constant extents".
>
> Was this illegal prior to f2008?
>
> I cannot find a reference to implied-shape in f2003.
>
> Thanks
>
> Anton
>
>
-- John Harper, School of Mathematics and Statistics
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail [log in to unmask] phone (+64)(4)463 5276 fax (+64)(4)463 5045
|