1*47946SbosticC 2*47946SbosticC Copyright (c) 1980 The Regents of the University of California. 3*47946SbosticC All rights reserved. 4*47946SbosticC 5*47946SbosticC %sccs.include.proprietary.f% 6*47946SbosticC 7*47946SbosticC @(#)seektst.f 5.2 (Berkeley) 04/12/91 8*47946SbosticC 9*47946Sbostic 1044000Sbostic character*20 word1, word2 1144000Sbostic integer ftell, fseek 1244000Sbostic open(1, file="/usr/dict/words") 1344000Sbostic iend = ftell(1) 1444000Sbostic iseek1 = fseek(1, iend/2, 0) 1544000Sbostic read(1,'(a)') word1 1644000Sbostic iword = ftell(1) 1744000Sbostic read(1,'(a)') word1 1844000Sbostic rewind 1 1944000Sbostic ibeg = ftell(1) 2044000Sbostic iseek2 = fseek(1, iword, 0) 2144000Sbostic read(1,'(a)') word2 2244000Sbostic write(*,*) ibeg, iword, ftell(1), iend 2344000Sbostic write(*,*) word1(:lnblnk(word1)), word2(:lnblnk(word2)) 2444000Sbostic write(*,*) "seek status", iseek1, iseek2, fseek(1, -1, 0) 2544000Sbostic end 26