This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PARAMETER use within FORMAT statements


Steve Kargl wrote:
On Mon, May 31, 2010 at 11:41:44AM -0700, Peter Willis wrote:
Hello,

I have a code format issue that I am attempting to work out
while converting some source to gfortran F90.

I have PARAMETER 'm' which represents an integer.

I have a READ statement that uses a format reference on line 100.

READ(3,100,ERR=1000) ....

The format statement has an issue whereby the original program
is inserting the PARAMETER 'm' as a record size into the FORMAT statement:

100 FORMAT(<m>F7.6)

Is there a notation, compatible with gfortran F90, for doing this?


This is an old extension, which probably goes back to DEC or older Fortran vendor

See the following URL for a suggested fix.

http://gcc.gnu.org/onlinedocs/gfortran/Variable-FORMAT-expressions.html




Thank you, that's exactly the solution.

Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]