ITextReader.ReadChar

Syntax

ReadChar: Char;

Description

The ReadChar method reads characters from a text file.

Example

Sub Main;

Var

File1: IFileInfo;

TextR: ITextReader;

c: Char;

Begin

File1:=New FileInfo.Attach("c:\New_folder\1.txt");

If File1.Exists Then

TextR:=File1.OpenTextReader;

c:=TextR.ReadChar;

End If;

Dispose File1;

End Sub Main;

After executing the example, the "b" variable contains a logical value read from the 1.dat binary file.

See also:

ITextReader