      program binary
c
c     Learn and test some stuff related to storing information
c     in binary format.
c
      real*4 a,b,c,x(10),y(10),z(10)
      real*8 jd
      integer*4 l,m,n
      integer*2 i,j,k
      character*2 nam
c
      integer*2 ia(50)
c
      equivalence (ia( 1),  jd),
     $            (ia( 5),   i),
     $            (ia( 6),   l),
     $            (ia( 8),x(1)),
     $            (ia(28),y(1)),
     $            (ia(48),   a),
     $            (ia(50), nam)
c
      a=3.1415
      do i=1,10
       x(i)=real(i-1)
       y(i)=x(i)+10.0
      enddo
      jd=2447880.123456789d0
      l=100000
      nam='Hi'
c
      open(1,file='bin.dat',access="DIRECT",
     $       form="UNFORMATTED",recl=100)
c
      do i=1,10
       write(1,rec=i)ia
      enddo
c
      close(1)
      end

