Seek Statement

Open 文で開かれたファイル内の次の書き込みまたは読み取りの位置を設定します。

ランダムアクセスファイルでは、Seek 文が、アクセスされる次のレコードの番号を設定します。

そのほかすべてのファイルでは、Seek 文が、次の演算が行われるバイト位置を設定します。

Syntax:

Seek Statement diagram


Seek [#]filePos, {filePos|recordNum}

Parameters:

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.

Error codes:

5 無効なプロシージャー呼び出しです

52 ファイル名または番号が不正です

Seek function

ご支援をお願いします!