Hi
Is there anything illegal about the following code, in particular the
DATA statements. I have a code with this style of module, and it
doesn't seem to be completely portable, though in part this may be due
to incomplete F90 compiler implementations. Or maybe my understanding
is incorrect, I not 100% sure when or where I need array constructors.
Cheers,
Kevin
module mod
type Table
integer , dimension (3) :: at_number
character (4) , dimension (3) :: at_name
end type Table
type (Table) :: A
type (Table) :: B
data A / Table ( (/ 1 , 2 , 3 /) , (/ "H ", "He " , "Li " /) ) /
data B % at_number / 1 , 2 , 3 /
data B % at_name / "$$$$" , "****" , "++++" /
end module mod
program prog
use mod
print *,A
print *,B
end program prog
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|