From: guijarrockguijarro@gmail.com
Subject: Simple Data Endianness
Date: Thu, 13 Feb 2020 01:42:13 -0800 (PST)
Date: 2020-02-13T01:42:13-08:00 [thread overview]
Message-ID: <2a19cdb1-6f01-4b1d-8597-b6ee21ed60ed@googlegroups.com> (raw)
Hi,
The problem I present today is related to the coexistence between big-endian and little-endian application data.
I have found a way that structures (records) are stored in memory according to one criterion or another (big-endian or little-endian).
Assuming that 'Date' is a structure type, I can use the following statements to indicate that I want them to be stored in memory as big-endian:
for Date'Bit_Order use System.High_Order_First;
for Date'Scalar_Storage_Order use System.High_Order_First;
My question appears when I have a simple type, such as an enumerated or an integer that occupies more than one byte and I need to instruct the compiler to store it in memory as a big-endian. Like this example:
type Colour is (BLACK,YELLOW,WHITE,RED);
for Colour'SIZE use 32;
Is there any analogous way of doing this as in the case of compound types?
Thank you so much.
next reply other threads:[~2020-02-13 9:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 9:42 guijarrockguijarro [this message]
2020-02-13 11:10 ` Simple Data Endianness Dmitry A. Kazakov
2020-02-13 15:12 ` Optikos
2020-02-13 15:28 ` Dmitry A. Kazakov
2020-02-13 16:47 ` Optikos
2020-02-13 17:29 ` Dmitry A. Kazakov
2020-02-13 20:36 ` Optikos
2020-02-14 8:20 ` Dmitry A. Kazakov
2020-02-14 17:25 ` Optikos
2020-02-14 20:22 ` Dmitry A. Kazakov
2020-02-15 14:56 ` Optikos
2020-02-13 15:44 ` Daniel
2020-02-13 15:57 ` Dmitry A. Kazakov
2020-02-14 16:52 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox