Regression or Feature?

Mikael Morin mikael.morin@sfr.fr
Sat Apr 27 09:57:00 GMT 2013


Le 27/04/2013 00:09, Tilo Schwarz a écrit :
>> However, I'm not completely sure about *why* the standard actually
>> forbids this (but I guess there is a good reason) ...
> 
> Same with me, especially since gfortran-4.7 does what I would expect
> without looking at the standard.
> 
> Maybe someone has a good argument? The most interesting I found was
> http://www.j3-fortran.org/OldMailArchives/j3/2005-September/002673.html.
> 
I think it makes some sense to reject.  With pointers, the sub-elements
are not guaranteed to be regularly spaced, so that their offset can't be
calculated like in regular arrays.

> My issue was, that I wanted to find the maximum of such an array. If the
> error message is correct I can't use min(...) for that but I have to use
> a do-loop myself, which is not so nice.
> 
> Maybe someone has an idea for a workaround for my "selfmade" do-loop
> solution?
> 
The link you posted suggests using an array constructor.

Mikael



More information about the Fortran mailing list