Seek Statement

Define a posição para a próxima escrita ou leitura num ficheiro aberto com a instrução Abrir.

Para ficheiros de acesso aleatório, a instrução Pesquisa define o número do próximo registo a ser acedido.

Para os restantes ficheiros, a instrução Pesquisa define a posição do byte na qual ocorrerá a operação seguinte.

Sintaxe:

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.

Códigos de erro

5 Chamada de procedimento inválido

52 Erro no nome ou número do ficheiro

Seek function

Necessitamos da sua ajuda!