Line Input# Statement

Reads a line from a sequential file into a variable.

Sintaksis:

Line Input Statement diagram


Line Input #fileNum, variable

Parameter:

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.

Dengan pernyataan Masukan Baris#, anda dapat membaca string dari file yang terbuka menjadi variabel. Variabel string dibaca baris demi baris hingga return carriage pertama (Asc = 13) atau linefeed (Asc = 10). Tanda garis akhir tidak termasuk dalam string yang dihasilkan.

Contoh:

Mohon dukung kami!