PROGRAM nltest IMPLICIT NONE INTEGER :: iarr(3), j REAL :: ascalar CHARACTER (LEN=11) :: label NAMELIST /qt/ ascalar, iarr, label ! Set some values iarr = (/-16, 144, 0/) j = 255 ascalar = 3.1415926535 label = 'Hello world' PRINT 100, iarr, j, ascalar, label OPEN (UNIT=10, FILE='nltest.dat', STATUS='UNKNOWN') WRITE (10, NML=qt) CLOSE (10) PRINT 100, iarr, j, ascalar, label ! Change the values iarr = (/3457389, -1, -9999/) j = 111 ascalar = 5e-12 label = 'Hello there' PRINT 100, iarr, j, ascalar, label OPEN (UNIT=10, FILE='nltest.dat', STATUS='OLD') READ (10, NML=qt) CLOSE (10) PRINT 100, iarr, j, ascalar, label 100 FORMAT (' iarr = ', 3I7, ' j = ', I3, & ' ascalar = ', E12.4, ' l = ', A) END PROGRAM nltest