IBinaryReader.ReadChar

Syntax

ReadChar: Char;

Description

The ReadChar method reads characters from a binary file.

Example

Executing the example requires the 1.dat binary file to be present in the root of the disc C.

Sub Main;

Var

File1: IFileInfo;

BinR: IBinaryReader;

c: Char;

Begin

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

If File1.Exists Then

BinR:=File1.OpenBinaryReader;

c:=BinR.ReadChar;

End If;

Dispose File1;

End Sub Main;

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

See also:

IBinaryReader