program testnl
  implicit none
  
  real*8 arga,argb,argc
  
  call read(arga, argb, argc)
  
  print *, arga, argb, argc
  
  stop
end program testnl

subroutine read(arga,argb,argc)
  
  implicit NONE
  
  real*8 arga,a
  real*8 argb,b
  real*8 argc,c
  namelist /name/ a,b,c

  read(5,name,err=100)
  
  arga=a
  argb=b
  argc=c
  
  return
  
100 write(0,'(A)')'error occurs @ reading namelist name'
  write(0,'(A)') 'stop.'

end subroutine read


