System.Classes.TReader.EndOfList

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function EndOfList: Boolean;

C++

bool __fastcall EndOfList();

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TReader

Description

Indicates the end of a group of items that are sequentially read from the stream.

EndOfList is used by other methods that iterate through a list of items when reading in data.

EndOfList returns True if the reader object has read to the end of a list of items. EndOfList calls ReadValue to check that the value-type indicator is vaNull. The vaNull value type signals the end of the list of the current type of data.

When reading a list of items, the reader object calls ReadListBegin method, and then the items are repeatedly read until EndOfList returns True. Finally, the reader calls ReadListEnd.

After reading a vaNull value-type indicator, EndOfList returns the stream position back before the value-type indicator.

Note: Component writers can use this in their defined property ReadData methods, as, for example, with TStrings.

See Also