zoukankan      html  css  js  c++  java
  • TBitConverter

    TBitConverter

    FromBcd  
    FromByte  
    FromCurrency  
    FromDouble  
    FromExtended  
    FromInteger  
    FromLargeInt  
    FromLongBool  
    FromLongInt  
    FromLongWord  
    FromShortInt  
    FromSingle  
    FromSmallInt  
    FromSqlTimeStamp  
    FromSqlTimeStampOffset  
    FromVariant  
    FromWord  
    FromWordBool  

    TBitConverter provides two main class functions:

    • From converts a value in a Delphi native type into an array of bytes.
    • InTo converts an array of bytes into a Delphi native type.

    Data.DB.TBitConverter.FromCurrency

    From RAD Studio API Documentation
     

    FromCurrency From

    Delphi
    class procedure FromCurrency(Value: Currency; Buffer: TArray<Byte>);
    C++
    __classmethod void __fastcall FromCurrency(System::Currency Value, System::DynamicArray<System::Byte> Buffer);
    >>>>>>>

    Delphi
    class procedure From<T>(const Value: T; var B: TArray<Byte>; Offset: Integer = 0); static;

    C++

    void __fastcall TBitConverter::From(const T Value, System::DynamicArray<System::Byte> &B, int Offset)

     ToInteger InTo

    Data.DB.TBitConverter.ToIntegerFrom RAD Studio API Documentation 

    Delphi

    class function ToInteger(Value: TArray<Byte>): Integer;

    C++

    __classmethod int __fastcall ToInteger(System::DynamicArray<System::Byte> Value);

    System.Types.TBitConverter.InTo     From RAD Studio API Documentation 

    Delphi

    class function InTo<T>(const B: TArray<Byte>; Offset: Integer = 0): T;

    static;C++

    __fastcall TBitConverter::InTo(const System::DynamicArray<System::Byte> B, int Offset)

    <T>必须是明确的类型 

    Data := TBitConverter.InTo<double>(Buffer);

  • 相关阅读:
    C#中的Dictionary字典类介绍
    SQL server 2008r2 file is corrupt
    web service接口 wsdl和asmx有什么区别
    ascx
    C++: C++函数声明的时候后面加const
    C++三种野指针及应对/内存泄露
    C++构造和析构的顺序
    atan2()如何转换为角度
    C++11左值引用和右值引用
    C++ STL详解
  • 原文地址:https://www.cnblogs.com/cb168/p/4378550.html
Copyright © 2011-2022 走看看