program main implicit none logical :: opened,named write(21,*) 1,2,3,4 inquire(21,opened=opened,named=named) write(*,*) opened,named end