Language:
Русский
English
Seek (procedure)
Moves the current position of a file to a specified component.
Declaration
procedure Seek(var F; N: Longint);
Target
Windows, Real, Protected
Remarks
F is any file variable type except text, and N is an expression of type Longint. The current file position of F is moved to component number N. The number of the first component of a file is 0. To expand a file, you can seek one component beyond the last component; that is, the statement Seek(F, FileSize(F)) moves the current file position to the end of the file.
With {$I-}, IOResult returns 0 if the operation was successful; otherwise, it returns a nonzero error code.
Restrictions
Cannot be used on text files. File must be open.