Seek Procedure
// Seek to a byte position in a text file. See SetInOutRes for the // same procedure with error-handling. Assume the buffer is empty. procedure TextSeek(var F: TextFile; Pos: LongInt); begin SetFilePointer(TTextRec(F).Handle, Pos, nil, File_Begin); end;
The start of the file is record number 0.
If F
is an untyped File
, the
record size is set when you open the file with
Reset
or Rewrite
.