PARAMETER statement
Jerry DeLisle
jvdelisle@verizon.net
Wed Jan 13 02:23:00 GMT 2010
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.
In the meantime. This works fine.
integer, parameter :: isize=15
dimension i(isize)
i(1)=0
end
I will report back after I review the standard on this.
Jerry
More information about the Fortran
mailing list