xlf Parameter statements
gravishanker at eagle.wesleyan.edu
gravishanker at eagle.wesleyan.edu
Fri Mar 8 12:08:48 AEST 1991
Hi
I found a strange behaviour on an IBM RISC/6000 (running AIX V 3.1) while
compiling a Fortran '77 program. It is so strange that it took a while before
nailing the problem down, so I thought I will share it here. The problem has
been tested even after the 3003 maintainance upgrade, which for us also meant
going to Version 2 of xlf. On a Silicon Graphics Iris or on a Vax, the
statement
Parameter a=10.
is accepted and a is assigned the value correctly. The xlf compiler does not
issue any compilation error, but does not assign anything for a. This is a
parsing problem and if you print the value of parametera that has the value of
10. The expected syntax is,
Parameter (a=10.)
and I think, ( acts as the lookahead token for parsing the Parameter statement.
On the other hand, xlf complains for
Parameter a=10.,b=-9.
and enclosing the assignments in parantheses solves the compiler error. Of
course, the Iris and Vax are perfectly happy with this type of statement.
Ravi
More information about the Comp.unix.aix
mailing list