IBinaryReader.EndOfList

Syntax

EndOfList: Boolean;

Description

The EndOfList method returns whether a binary file page end is reached.

Example

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

Sub Main;

Var

File1: IFileInfo;

BinR: IBinaryReader;

IntList: IArrayList;

Begin

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

IntList:=New ArrayList.Create;

If File1.Exists Then

BinR:=File1.OpenBinaryReader;

BinR.ReadListBegin;

While Not BinR.EndOfList Do

IntList.Add(BinR.ReadInteger);

End While;

BinR.ReadListEnd;

End If;

Dispose File1;

End Sub Main;

After executing the example integer values from the 1.dat files are read into the IntList array.

See also:

IBinaryReader