Show: Delphi C++
Display Preferences

System.TDoubleRec

From XE2 API Documentation
Jump to: navigation, search

Delphi

  TDoubleRec = packed record
  private
    function GetExp: UInt64; inline;
    function GetFrac: UInt64; inline;
    function GetSign: Boolean; inline;
    procedure SetExp(NewExp: UInt64);
    procedure SetFrac(NewFrac: UInt64);
    procedure SetSign(NewSign: Boolean);
  public
    function Exponent: Integer;
    function Fraction: Extended;
    function Mantissa: UInt64;
    property Sign: Boolean read GetSign write SetSign;
    property Exp: UInt64 read GetExp write SetExp;
    property Frac: UInt64 read GetFrac write SetFrac;
    function SpecialType: TFloatSpecial;
    procedure BuildUp(const SignFlag: Boolean; const Mantissa: UInt64; const Exponent: Integer);
    class operator Explicit(a: Extended): TDoubleRec;
    class operator Explicit(a: TDoubleRec): Extended;
    case Integer of
    0: (Words: array [0..3] of UInt16);
    1: (Bytes: array[0..7] of UInt8);
  end;

C++

struct DECLSPEC_DRECORD TDoubleRec{
private:
unsigned __int64 __fastcall GetExp(void);
unsigned __int64 __fastcall GetFrac(void);
bool __fastcall GetSign(void);
void __fastcall SetExp(unsigned __int64 NewExp);
void __fastcall SetFrac(unsigned __int64 NewFrac);
void __fastcall SetSign(bool NewSign);
public:
int __fastcall Exponent(void);
Extended __fastcall Fraction(void);
unsigned __int64 __fastcall Mantissa(void);
__property bool Sign = {read=GetSign, write=SetSign};
__property unsigned __int64 Exp = {read=GetExp, write=SetExp};
__property unsigned __int64 Frac = {read=GetFrac, write=SetFrac};
TFloatSpecial __fastcall SpecialType(void);
void __fastcall BuildUp(const bool SignFlag, const unsigned __int64 Mantissa, const int Exponent);
static TDoubleRec __fastcall _op_Explicit(Extended a);
union
{
struct
{
System::StaticArray<Byte, 8> Bytes;
};
struct
{
System::StaticArray<Word, 4> Words;
};
};
};

Properties

Type Visibility Source Unit Parent
struct
class
public
System.pas
System.hpp
System System

Description

Provides support for manipulating double precision floating-point values.

A TDoubleRec can be used to perform low-level operations on a double precision floating-point value. For example, the sign, the exponent, and the mantissa can be changed separately.

See Also

Personal tools
Previous Versions
Translations