Namelist Internal Read

From: Gary L. Scott (garyscott_at_ev1.net)
Date: 03/28/05


Date: Sun, 27 Mar 2005 17:29:17 -0600

I want to be able to do this:

program testcon

    implicit none

    character(255) :: text

    namelist /example/ val1, val2, val3

    real :: val1, val2, val3

    val1 = 0.0
    val2 = 0.0
    val3 = 0.0

    text = "&example val1=1.01, val2=1.02, val3=1.03/"

    read(text,nml=example) !I vanna do this!

end program
        
Why is it prohibited? I'd also like a few IOSTAT variables defined to
diagnose various errors. In particular, I'd like one to indicate when
an "undefined" assignment is encountered and especially nice would be to
expound on the type of assignment being attempted and/orand a character
index/position where the keyword starts so that the application can
diagnose the error itself.

-- 
Gary Scott
mailto:garyscott@ev1.net
Fortran Library:  http://www.fortranlib.com
Support the Original G95 Project:  http://www.g95.org
-OR-
Support the GNU GFortran Project:  http://gcc.gnu.org/fortran/index.html
Why are there two?  God only knows.
If electricity comes from electrons, does morality come from morons?