A couple of issues

Steve Kargl sgk@troutmask.apl.washington.edu
Thu Feb 1 00:41:00 GMT 2007


On Wed, Jan 31, 2007 at 05:41:46PM +0000, Ignacio Fern?ndez Galv?n wrote:
> 
> The second thing, is that, compiling with -std=f95 or -std=f2003, I get
> this error:
> 
>     Bij=RESHAPE((/ 1.0D0,3.0D0,3.0D0, &
>        1
> Error: Extension: Evaluation of nonstandard initialization expression
> at (1)
> 
> but nothing for Aij. It works fine with -std=gnu or -std=legacy. Is
> there something in the standard preventing "reshape" for real variables
> and alowing it for integers?
> 

In Fortran 95, only a select few intrinsic procedures are allowed
in an initialization expression.  RESHAPE with real arrays may not be
one of those, so you get the Error: with -std=f95.  I'm not sure what
restrictions if any that Fortran 2003 may place on RESHAPE.  RESHAPE
with integer arrays works because it is allowed by the standard.  See
page 94 of the Fortran 95 standard.
 

-- 
Steve



More information about the Fortran mailing list