On 11/02/2016 04:47 PM, Fritz Reese wrote:
All,
Another quirk of legacy compilers is their syntax for PARAMETER
statements. Such statements are similar to standard PARAMETER
statements but lack parentheses following the PARAMETER keyword. There
is a good reason the standard doesn't support this - because the
statement becomes ambiguous with assignment statements in fixed form.
Consider the following:
parameter pi = 3.14d0
In fixed form, spaces are ignored so in standard Fortran the above
looks like an assignment to the variable "parameterpi". In legacy
compilers, the above is instead interpreted as
parameter (pi = 3.14d0)
which of course declares the variable 'pi' to be a parameter with the
value 3.14.
Please test this with a program that has a *variable* that's named
PARAMETER.
I have encountered Fortran compilers in the past that couldn't cope with
it (I won't name names).
Thanks and kind regards,
--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news