PARAMETER use within FORMAT statements
Peter Willis
pwillis@aslenv.com
Mon May 31 18:57:00 GMT 2010
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
More information about the Fortran
mailing list