TextReader.Read

Syntax:

Read(<LineSize>)

Parameters:

<LineSize> (optional)

Type: Number.
Size of line to be returned. If the parameter is not specified, the text file will be read to the end.

Returned value:

Type: String; Undefined.
When the file to be read is completed, Undefined is returned.

Description:

Calculates random length line.

Availability:

Thin client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Note:

A zero-length line is not a flag for the end of the file.

Example:

Text = New TextReader("d:\win.txt", TextEncoding.ANSI);
Str = Text.Read(10);
While 
Str <> Undefined Do // read file by 10 characters
    Message(Str);
    Str = Text.Read(10);
EndDo
;


    

1C:Enterprise Developer's Community