System.Classes.TReader.ReadListEnd

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ReadListEnd; inline;

C++

void __fastcall ReadListEnd(void);

Properties

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

Description

Reads an end-of-list value-type indicator from the reader object's stream.

ReadListEnd is used by other methods that iterate through a list of items to signal the end of a group of items being read.

ReadListEnd checks whether the next data item at the current stream Position is an end-of-list vaNull value-type indicator as written by the WriteListEnd method.

ReadListEnd calls ReadValue to check whether the value-type indicator is vaNull, then ReadListEnd succeeds and advances the stream position after the value-type indicator.

If ReadValue retrieves other than vaNull but correct value-type indicator, then ReadListEnd skips the number of bytes specified by the obtained value-type indicator and raises an EReadError exception.

A call to ReadListEnd is preceded by a reading loop that terminates when the EndOfList method returns True, indicating that an end-of-list marker is next on the stream.

A call to ReadListEnd must correspond to a preceding call to ReadListBegin.

See Also