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);

  • 相关阅读:
    使用a标签制作tooltips
    使用editorconfig配置你的编辑器
    JointJS绘制流程图
    用highcharts展现你的数据
    css段落首字母下沉
    sklearn框架的系统学习
    numpy删除二维数据矩阵的行和列
    sklearn中机器学习算法评价指标
    sklearn调用逻辑回归算法
    sklearn调用多项式回归
  • 原文地址:https://www.cnblogs.com/cb168/p/4378550.html
Copyright © 2011-2022 走看看