!
!     Establish a data structure and display mechanism 
!     for presidential facts.
      module facts
        integer, parameter :: WIDTH=32
        type key_facts
          character (len=WIDTH) :: who
          character (len=WIDTH) :: what
          character (len=WIDTH) :: k_where
          character (len=WIDTH) :: when
        end type key_facts
        contains
          subroutine show_facts ( fact_set, number )
            type ( key_facts ) fact_set
            integer number 
            print 100, number
100         format ( /, ' ', 'Number ', i2.2, / ) !zgs, 
! two comma after and before the slash need to be added
            print 200, fact_set
200         format (   ' ', 10x, a )
          end subroutine show_facts
      end module facts

      program history
!
!     Bring in the data structure and display mechanism.
      use facts
      type ( key_facts ) presidents(42)
!
!     Record information about the first and current president.
      presidents(1)%who   = "George Washington"
      presidents(1)%what  = "Engineer, General"
      presidents(1)%k_where = "Mount Vernon, VA"
      presidents(1)%when  = "1789-1797"
      presidents(42) = key_facts ( "Bill Clinton", "Governor", &
                                  "Little Rock, AK", "1993-?" )
!
!     Display the information for the only two elements of
!     PRESIDENTS that have data.
      call show_facts ( presidents( 1),  1 )
      call show_facts ( presidents(42), 42 )
      print *, " "
      end program history
