4 ms·
You can specify endianness, but only over the entire record, not an individual field. The way it works is a little complicated: https://www.adacore.com/gems/gem
by LiamPowell 2y ago
You can specify endianness, but only over the entire record, not an individual field. The way it works is a little complicated: https://www.adacore.com/gems/gem-140-bridging-the-endianness-gap https://www.adacore.com/gems/gem-140-bridging-the-endianness...
- quietbritishjim 2y agoInteresting, thank you. I think per-record is probably good enough for most applications, and less verbose than per-member. But it's not part of the language (that page calls it "implementation specific") and quite recent (that page is undated but references Ada 2012 so must be since then). It wouldn't have helped the Ada project I'm working on, which had an endianess crisis with serialisation a few decades ago.
- Jtsummers 2y agoAda 95 added bit ordering. https://www.adaic.org/resources/add_content/standards/95rat/rat95html/rat95-p2-13.html#1 https://www.adaic.org/resources/add_content/standards/95rat/... https://www.adaic.org/resources/add_content/standards/95lrm/ARM_HTML/RM-13-5-3.html https://www.adaic.org/resources/add_content/standards/95lrm/...