Seek Statement

设置通过 Open 语句打开的文件中的下一个写入或读取位置。

对于随机访问文件,Seek 语句设置要访问的下一个记录的编号。

对于所有其他文件,Seek 语句设置要进行下一个操作的字节位置。

语法:

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.

错误代码:

5 无效的过程调用

52 错误的文件名或编号

Seek function

请支持我们!