Hi There,
right now I stuck with Fortran's NAMELISTs. My objective is to simply
parse a config-file containing several groups, each multiple times.
Well, this is not so very hard, however, I am looking for a
sophisticated way iterating through all the NAMELISTs using Fortran 95.
Sure, I start just by defining all my NAMELISTs. As a second Step - and
this is where I stuck - I would like iterate through all those
NAMELISTs. Is there a way to put NAMELISTs into an array or so? My idea
is having a code like:
DO i=1, SIZE( lists )
READ( 99, NMT=lists(i) )
...
END DO
Any suggestions how to put all the NAMELISTs into one 'container' I
could iterate through?
(Another even more sophisticate approach might be to figure out how to
pass a NAMELIST as a function argument. Any ideas? )
Cheers,
Stefan
Btw.: I am using gfortran on Debian Lenny.
|