System.Classes.TReader.ReadInteger
Delphi
function ReadInteger: Integer;
C++
int __fastcall ReadInteger();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TReader |
Description
Reads and returns an integer type number from the reader object's stream.
ReadInteger is a helper method used by other reader methods to read a tagged integer value at the current reader Position.
ReadInteger calls ReadValue to read the value-type indicator. If the retrieved value-type indicator is:
vaInt8
-- ReadInteger calls Read to read the Int8 type integer value at the current reader Position and returns the obtained value as an Integer type value.vaInt16
-- ReadInteger calls Read to read the Int16 type integer value at the current reader Position and returns the obtained value as an Integer type value.vaInt32
-- ReadInteger calls Read to read the Int32 type integer value at the current reader Position and returns the obtained value as an Integer type value.- Otherwise, ReadInteger raises an EReadError exception.
ReadInteger advances the reader Position after the last byte it has read.