PROGRAM readnml
  IMPLICIT NONE
  INTEGER, PARAMETER               :: lun = 10
  INTEGER                          :: res
  INTEGER                          :: x, y, z
  INTEGER                          :: l

  NAMELIST /ints/ x, y, z, l
  
  OPEN(UNIT=lun,FILE='nmltest',STATUS='OLD',IOSTAT=res)
  READ(UNIT=lun,NML=ints,IOSTAT=res)

  PRINT *, x, y, z, l
  CLOSE(UNIT=lun)

END PROGRAM readnml
