PARAMETER statement
Tim Prince
n8tm@aol.com
Wed Jan 13 02:52:00 GMT 2010
Jerry DeLisle wrote:
> On 01/12/2010 05:49 PM, David Carr wrote:
>> I am new to gfortran (tho been programming in Fortran for 35 years on
>> DEC machines)
>>
>> I am trying a port of VAX fortran program to Windows
>>
>> Have installed and trying to use gfortran
>>
>> Sources have a lot of PARAMETER statements that define array sizes in
>> later array declarations. This is how I've always known to use
>> PARAMETER statements.
>>
>> The following will not compile:
>>
>> parameter isize=15
>> dimension i(isize)
>> i(1)=0
>> end
>>
>> gfortran doesn't seem to allow declarations after PARAMETER statements.
>>
>> Are there switches to accept this. Is a preprocessor needed? If this
>> is a limitation of gfortran, can you suggest another fortran for a VAX
>> to Windows port?
>>
>
> As far as I can tell, the syntax for the parameter statement is wrong.
> Perhaps its a DEC extension. I will have to read the Standards on this
> yet.
This was a common extension in the mid-70's, not identically implemented
on various compilers. Typically, the identifier data type was
determined by the form of the constant (!). This form is expected not
to work with IMPLICIT NONE, which VAX Fortran supported early on. VAX
Fortran supported the f77 form by late '78, but we still had compilers
which didn't, until the mid-80's.
More information about the Fortran
mailing list