Does 'seek' have to used with 'if'.....
- Posted by John F Dutcher <John_Dutcher at urmc.rochester.edu> Oct 15, 2004
- 643 views
Here's a brief code sample that fails on the first occurence of the 'seek' attempt with this message: Syntax error: ... "expected possibly to see 'end', not a function" 'seek(fn, tobyte)'
include machine.e include file.e include get.e without warning without type_check crash_file("error-messages.txt") integer fn integer tobyte sequence resdata fn=open("dsysmst.dat","rb") if fn < 1 then puts(1, "Unable to open the disk file\n") abort(fn) else tobyte = 0 seek (fn, tobyte) for i = 1 to 10 do resdata = get_bytes(fn, 40) puts(1, resdata & '\n') tobyte = tobyte + 2690 seek (fn, tobyte) end for end if close(fn) puts(1,"Test display of records completed")