Hi, I am new to Fortran and using Compaq visual fortran. I tried looking up on google but couldn't resolve ths problem.
I need to declare a matrix but the dimensions of this will not be knwon till the program gets to the executable part of the code. From the executable part i get a value for say j and my matrix needs to be F(1,j). These lines in the executable part of the code
==============================
REAL, dimension(1,j):: FN
FN(1,=0
==============================
create the following error: "Error: A specification statement cannot appear in the executable section."
Is there a way to define a matrix in the beginning with the help of variables whose value is established in the executable part of the program. Please help.Thanks
ahad
I need to declare a matrix but the dimensions of this will not be knwon till the program gets to the executable part of the code. From the executable part i get a value for say j and my matrix needs to be F(1,j). These lines in the executable part of the code
==============================
REAL, dimension(1,j):: FN
FN(1,=0
==============================
create the following error: "Error: A specification statement cannot appear in the executable section."
Is there a way to define a matrix in the beginning with the help of variables whose value is established in the executable part of the program. Please help.Thanks
ahad