Re: writing output listing onto screen (or not) and onto file




bru wrote:

I tried to compile your code: it works with g95, ifort and pgf90 but not
with f90 of Sun; error messages are:


integer, parameter :: USR_UNIT(2) = [6, 8]
^
"io.f90", Line = 2, Column = 40: ERROR: Unexpected syntax: "operand" was
expected but found "[".
^
"io.f90", Line = 2, Column = 44: ERROR: Unexpected syntax: "object-name"
was expected but found "8".

Yes, It's a f2003 feature, sorry about that. Try using:

integer, parameter :: USR_UNIT(2) = (/ 6, 8 /)

.



Relevant Pages