IBinaryWriter.WriteChar

Syntax

WriteChar(Value: Char);

Parameters

Value — character that should be written.

Description

The WriteChar method writes characters into a binary file.

Example

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

Sub Main;

Var

File1: IFileInfo;

BinW: IBinaryWriter;

Begin

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

If File1.Exists Then

BinW:=File1.OpenBinaryWriter(True);

BinW.WriteChar('A');

End If;

Dispose File1;

End Sub Main;

After executing this example, letter A is written into a binary file 1.dat.

See also:

IBinaryWriter