【问题标题】:Translate from C to Delphi : struct fields align从 C 翻译到 Delphi:结构字段对齐
【发布时间】:2014-12-24 04:08:09
【问题描述】:

请帮助我,我如何在 delphi 中做到这一点? 谢谢。

struct x
{
uint32 a : 32;
unsigned int b : 20;
unsigned int c : 4;
};

【问题讨论】:

    标签: c delphi bit-fields


    【解决方案1】:

    该结构使用称为位域的 C 功能,其中整数可以具有小数字节的宽度。 位域在 Delphi 中不可用,有关如何使用对象的详细信息,请参阅此问题的答案

    How to simulate bit-fields in Delphi records?

    【讨论】:

      猜你喜欢
      • 2021-04-20
      • 1970-01-01
      • 2013-07-24
      • 2014-02-19
      • 1970-01-01
      • 2021-11-16
      • 2016-02-23
      • 2019-07-14
      相关资源
      最近更新 更多