Silverfrost Forums

Welcome to our forums

Shape intrinsic with parameter attribute

20 Nov 2012 5:26 #11135

The compiler gives an error in the following code. But the declaration of variable b is valid Fortran 90 syntax.

program anon

   integer :: i, j, prototype(2,2)

   integer, parameter, dimension(2,2) :: a = reshape((/1, 2, 3, 4/), (/2,2/))
   integer, parameter, dimension(2,2) :: b = reshape((/1, 2, 3, 4/), shape(prototype))

   do i=1, 2
      print *, (a(i,j), j=1,2)
   end do

   do i=1, 2
      print *, (b(i,j), j=1,2)
   end do

end program anon
21 Nov 2012 8:49 #11143

I have logged this for investigation.

2 Apr 2013 3:15 #11937

I have had a look at this and it looks like the functionality is missing rather than there being code that can be fixed.

I will leave it on the list of things to do but with a low priority because of the amount of work involved.

2 Apr 2013 3:56 #11938

OK Thanks.

9 Feb 2015 6:25 #15621

This has now been fixed for the next release.

13 Feb 2015 6:23 #15641

Thank you.

Please login to reply.