System.Classes.TReader.ReadBoolean
Delphi
function ReadBoolean: Boolean;
C++
bool __fastcall ReadBoolean();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TReader |
Description
Reads a boolean value-type indicator from the reader object's stream and returns the corresponding boolean value.
ReadBoolean is a helper method used by other reader methods to retrieve a tagged boolean value at the current reader Position. ReadBoolean uses ReadValue to read a value-type indicator:
- If the value-type indicator is
vaTrue
then ReadBoolean returnsTrue
. - If the value-type indicator is
vaFalse
, then ReadBoolean returnsFalse
. - If the value-type indicator is not
vaTrue
orvaFalse
, then ReadBoolean raises an Invalid property value exception and returnsFalse
.
ReadBoolean advances the stream position after the value-type indicator.