Union with bits ?
Paul
phshaffer at gmail.com
Thu Jun 15 01:18:24 UTC 2023
On Wednesday, 14 June 2023 at 22:44:41 UTC, Ali Çehreli wrote:
> By the way, the string that bitfields() generates can be
> visualized by simply printing it:
>
> const code =
> bitfields!(
> ubyte, "A", 1,
> ubyte, "B", 1,
> ubyte, "C", 1,
> ubyte, "padding", 5,);
> writeln(code);
>
> The output is not pretty for the human eye but those are
> basically the getters and setters that Adam D Ruppe mentioned.
>
> Ali
Excellent help. Thanks Adam and Ali.
More information about the Digitalmars-d-learn
mailing list