1C 2C Copyright (c) 1983 The Regents of the University of California. 3C All rights reserved. 4C 5C %sccs.include.proprietary.f% 6C 7C @(#)f2.f 5.2 (Berkeley) 04/12/91 8C 9 10C From aho@ Tue Aug 23 13:07:25 1983 11C Date: Tue, 23 Aug 83 13:04:19 PDT 12C From: aho@@ (Alan Hopkins) 13C Subject: 4.2 rewind problem 14C 15C Here is a chunk of code that does not seem to operate properly 16C on bach. The file does not contain any data at completion. 17 18 program aho 19 open ( unit=13, form='unformatted', status='unknown', 20 . access='sequential',file='UNIX' ) 21 do 5 i = 1, 2 22 ieot = -i 23 write(13) ieot 24 5 continue 25 endfile(13) 26 call system("od -Iw12 UNIX") 27 write(13) 3 28 write(13) 4 29C call flush(13) 30 call system("od -Iw12 UNIX") 31 backspace(13) 32 backspace(13) 33 read(13) i 34 write(*,*) "3 ==", i 35 write(13) 5 36 rewind(13) 37 call system("od -Iw12 UNIX") 38 close(13) 39 call system("od -Iw12 UNIX") 40 stop 41 end 42 43