Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [photran] Inline array assignment -- Texer Error

So the array constructor that is standard in F95 is (/ ac-value-list /) rule R432. I hadn't ever looked at the back of the book to see what the rules actually stated.
 
Thanks for the assistance.
 
Darren


From: photran-bounces@xxxxxxxxxxx [mailto:photran-bounces@xxxxxxxxxxx] On Behalf Of Craig Rasmussen
Sent: Monday, June 18, 2007 3:36 PM
To: Photran Information
Cc: Christopher D. Rickett
Subject: Re: [photran] Inline array assignment -- Texer Error

This is an array constructor, rule R467 in the 2003 standard.  The [] notation is not in F95.

Cheers,
Craig


On Jun 18, 2007, at 2:22 PM, Wade, Darren W wrote:

The Lexer gives an error when square brackets are used to assign values to an array.  Error is "Unexpected character [".

snippet is as follows:
-------------------------------------------------------------------------

integer, allocatable :: junk (:)

allocate(junk(3))
junk = [1, 2, 3]
-------------------------------------------------------------------------

I can't find the square brackets listed in my Fortran 95 Handbook, but all of the compilers that I have used support it, specifically Intel, Compaq and gfortran.  Is it not supported by Photran due to this not being standard iso/ansi fortran?


Darren Wade

_______________________________________________
photran mailing list


Back to the top