Line Input# Statement

Reads a line from a sequential file into a variable.

Sintaxe:

Line Input Statement diagram


Line Input #fileNum, variable

Parâmetros:

fileNum: Number of the file that contains the data that you want to read. The file must have been opened in advance with the Open statement using the key word INPUT.

variable: The name of the variable that stores the result.

Através da instrução Line Input#, é possível ler cadeias de um ficheiro aberto para uma variável. As variáveis de cadeia são lidas linha a linha até à primeira mudança de linha (Asc=13) ou avanço de linha (Asc=10). As marcas de fim de linha não estão incluídas na cadeia resultante.

Exemplo:

Necessitamos da sua ajuda!