System.Classes.TReader.ReadListBegin

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ReadListBegin; inline;

C++

void __fastcall ReadListBegin(void);

Properties

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

Description

Reads a start-of-list value-type indicator from the reader object's stream.

ReadListBegin is used by other methods that iterate through a list of items to ensure that the type about to be read is a list.

ReadListBegin checks whether the next data item at the current reader Position in the stream is a start-of list vaList value-type indicator as written by the WriteListBegin method.

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

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

A call to ReadListBegin is generally followed by a reading loop that terminates when the EndOfList method returns True, indicating that an end-of-list marker is next on the stream, at which point a call to ReadListEnd is required.

See Also