Seek Statement

設定由 Open 陳述式開啟的檔案中下一個寫入或讀取的位置。

對於隨機存取檔案,Seek 陳述式會設定下一個要存取之條目的號碼。

對於所有其他檔案,Seek 陳述式會設定進行下一個運算的位元組位置。


Seek Statement diagram

Seek [#]filePos, {filePos|recordNum}


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

filePos, recordNum: 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.


5 無效的程序呼叫

52 錯誤的檔案名稱或檔案編號

Seek function

Please support us!