IBinaryWriter.WriteInteger

Syntax

WriteInteger(Value: Integer);

Parameters

Value — integer number that must be written.

Description

The WriteInteger method writes an integer number into 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;

BinW: IBinaryWriter;

Begin

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

If File1.Exists Then

BinW:=File1.OpenBinaryWriter(True);

BinW.WriteInteger(100);

End If;

Dispose File1;

End Sub Main;

After executing the example the number 100 in a binary format is written to the 1.dat file.

See also:

IBinaryWriter