File:  [CSRG BSD Unix] / 42BSD / usr.lib / libU77 / test / seektst.f
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

	character*20 word1, word2
	integer ftell, fseek
	open(1, file="/usr/dict/words")
	iend = ftell(1)
	iseek1 = fseek(1, iend/2, 0)
	read(1,'(a)') word1
	iword = ftell(1)
	read(1,'(a)') word1
	rewind 1
	ibeg = ftell(1)
	iseek2 = fseek(1, iword, 0)
	read(1,'(a)') word2
	write(*,*) ibeg, iword, ftell(1), iend
	write(*,*) word1(:lnblnk(word1)), word2(:lnblnk(word2))
	write(*,*) "seek status", iseek1, iseek2, fseek(1, -1, 0)
	end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.