System.Classes.TReader.ReadSingle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ReadSingle: Single;

C++

float __fastcall ReadSingle();

Properties

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

Description

Reads and returns a Single floating-point number from the reader object's stream.

ReadSingle is a helper method used by other reader methods to read a Single floating-point value at the current reader Position. (Single corresponds to float in C++.)

ReadSingle calls ReadValue to check whether the value-type indicator is vaSingle, and then ReadSingle calls Read and returns the retrieved Single type value. Otherwise ReadSingle returns the stream position back before the value-type indicator, calls ReadInt64, and returns the retrieved value.

ReadSingle advances the reader Position after the last byte it has read.

See Also