1: C From aho@ Tue Aug 23 13:07:25 1983
   2: C Date: Tue, 23 Aug 83 13:04:19 PDT
   3: C From: aho@@ (Alan Hopkins)
   4: C Subject: 4.2 rewind problem
   5: C
   6: C Here is a chunk of code that does not seem to operate properly
   7: C on bach.  The file does not contain any data at completion.
   8: 
   9:          program aho
  10:          open ( unit=13, form='unformatted', status='unknown',
  11:      .   access='sequential',file='UNIX' )
  12:          do 5 i = 1, 2
  13:             ieot = -i
  14:             write(13) ieot
  15:     5    continue
  16:          endfile(13)
  17:          call system("od -Iw12 UNIX")
  18:          write(13) 3
  19:          write(13) 4
  20: C	 call flush(13)
  21:          call system("od -Iw12 UNIX")
  22:          backspace(13)
  23:          backspace(13)
  24:          read(13) i
  25:          write(*,*) "3 ==", i
  26:          write(13) 5
  27:          rewind(13)
  28:          call system("od -Iw12 UNIX")
  29:          close(13)
  30:          call system("od -Iw12 UNIX")
  31:          stop
  32:          end
Last modified: 1983-08-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 391
Valid CSS Valid XHTML 1.0 Strict