PARAMETER declaration
Giacomo Mariani
giacomomariani@yahoo.it
Tue Apr 29 14:40:00 GMT 2008
Hi all,
I hope to not be OT.
I've a problem compiling a module in which there is a multidimensional
array declared as parameter this way:
Integer(kind=4),Parameter :: FT=4
Integer(kind=4),Dimension(3,FT),Parameter ::FV=[[1,2,3],[2,3,4],[3,4,1],[4,1,2]]
When I compile with gfortran (4.2.4 on freebsd6.3 or 4.2.3 on Ubuntu
4.2.3-2ubuntu7) I have:
Integer(kind=4),Dimension(3,FT),Parameter ::FV=[[1,2,3],[2,3,4],[3,4,1],[4,1
....................................................................1
Error: Incompatible ranks 2 and 1 in assignment at (1)
while it compile well with the CompaqVisualFortran.
Is this a bug or the syntax is non-standard? In the second case which
is the right one?
Thank you very much
Giacomo
More information about the Fortran
mailing list