mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 19:22:05 +01:00
* Add ReadDouble
This commit is contained in:
parent
386f31ef4c
commit
14e9446c08
@ -1881,6 +1881,7 @@ type
|
||||
{$ifndef FPUNONE}
|
||||
function ReadFloat: Extended;
|
||||
function ReadSingle: Single;
|
||||
function ReadDouble: Double;
|
||||
function ReadDate: TDateTime;
|
||||
{$endif}
|
||||
function ReadCurrency: Currency;
|
||||
|
||||
@ -1119,6 +1119,25 @@ begin
|
||||
Result := ReadInt64;
|
||||
end;
|
||||
|
||||
function TReader.ReadDouble: Double;
|
||||
begin
|
||||
// We have no vaDouble
|
||||
Case FDriver.NextValue of
|
||||
vaExtended:
|
||||
begin
|
||||
ReadValue;
|
||||
Result := FDriver.ReadFloat
|
||||
end;
|
||||
vaSingle:
|
||||
begin
|
||||
ReadValue;
|
||||
Result := FDriver.ReadSingle
|
||||
end;
|
||||
else
|
||||
Result := ReadInt64;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TReader.ReadSignature;
|
||||
begin
|
||||
FDriver.ReadSignature;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user