System.TDoubleRec

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

TDoubleRec = packed record

C++

struct DECLSPEC_DRECORD TDoubleRec
{
private:
    double aDouble;
    UInt8 __fastcall InternalGetBytes(unsigned Index);
    UInt16 __fastcall InternalGetWords(unsigned Index);
    void __fastcall InternalSetBytes(unsigned Index, const UInt8 Value);
    void __fastcall InternalSetWords(unsigned Index, const UInt16 Value);
    UInt8 __fastcall GetBytes(unsigned Index);
    UInt16 __fastcall GetWords(unsigned Index);
    void __fastcall SetBytes(unsigned Index, const UInt8 Value);
    void __fastcall SetWords(unsigned Index, const UInt16 Value);
    unsigned __int64 __fastcall GetExp();
    unsigned __int64 __fastcall GetFrac();
    bool __fastcall GetSign();
    void __fastcall SetExp(unsigned __int64 NewExp);
    void __fastcall SetFrac(unsigned __int64 NewFrac);
    void __fastcall SetSign(bool NewSign);
public:
    int __fastcall Exponent();
    Extended __fastcall Fraction();
    unsigned __int64 __fastcall Mantissa();
    __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 __fastcall BuildUp(const bool SignFlag, const unsigned __int64 Mantissa, const int Exponent);
    static TDoubleRec __fastcall _op_Explicit(Extended a);
    __property UInt8 Bytes[unsigned Index] = {read=GetBytes, write=SetBytes};
    __property UInt16 Words[unsigned Index] = {read=GetWords, write=SetWords};
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.pas
System.hpp
System System

説明

警告: TDoubleRec は非推奨になっています。 SysUtils.TDoubleHelper を使用してください。

倍精度浮動小数点値を操作するためのサポートを提供します。


TDoubleRec は、倍精度浮動小数点値に対して低レベル操作を実行するのに使用できます。たとえば、符号、指数、仮数を個別に変更できます。

メモ:

  • 倍精度浮動小数点データ型を操作する場合は、TDoubleHelper を使用することをお勧めします。ただし、TDoubleRec が使用されなくなったわけではないので、TDoubleRec を使用して倍精度浮動小数点データを割り当てることはできます。
  • XE3 では、Bytes プロパティと Words プロパティは配列プロパティになりました。High 関数と Low 関数は配列プロパティには適用されません。

関連項目