Seek Statement

Sets the position for the next writing or reading in a file that was opened with the Open statement.

For random access files, the Seek statement sets the number of the next record to be accessed.

Za sve datoteke, funkcija vraća položaj bajta koji će se pojaviti u sljedećoj aktivnosti.

See also: Open, Seek.

Syntax:


Seek[#FileNumber], Position (As Long)

Parametri:

FileNumber: The data channel number used in the Open statement.

Position: Position for the next writing or reading. Position can be a number between 1 and 2,147,483,647. According to the file type, the position indicates the number of the record (files in the Random mode) or the byte position (files in the Binary, Output, Append or Input mode). The first byte in a file is position 1, the second byte is position 2, and so on.

Error codes:

5 Invalid procedure call

52 Invalid file name or file number

Please support us!