----------------------------------------------------------------------------------
@MSGID: <knff56Fdjg6U1@mid.individual.net>
bec98834
@REPLY: 1@dont-email.me> c993c6a8
@REPLYADDR Niklas Holsti
<niklas.holsti@tidorum.invalid>
@REPLYTO 2:5075/128 Niklas Holsti
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:
<knff56Fdjg6U1@mid.individual.net>
@RFC-References:
<22930fd1-c7ff-46cf-8c75-892212afa85en@googlegroups.com> 1@dont-email.me> 1@dont-email.me>
@TZUTC: 0300
@PID: Mozilla/5.0 (Macintosh; Intel Mac OS X
10.14; rv:102.0) Gecko/20100101 Thunderbird/102.12.0
@TID: FIDOGATE-5.12-ge4e8b94
On 2023-09-26 9:13, Randy Brukardt wrote:
> ... for Janus/Ada, enumeration types with specified representations
> operate internally on the position numbers
Hm, that`s interesting. Is that also the representation for record
components of such an enumerated type?
For example, if I have:
type Command is (Off, On) with Size => 4;
for Command use (Off => 2, On => 5);
type Two_Commands is record
C1, C2: Command;
end record
with Pack, Size => 8;
TwoC : Two_Commands := (C1 => On, C2 => Off);
will the record components (in memory) have the values C1 = 1 and C2 = 0
(position numbers) or C1 = 5, C2 = 2 (specified representation)?
If they are represented by position numbers in the record, many if not
most of my embedded Ada programs would fail if compiled with Janus/Ada,
because the record values stored in I/O control registers or accessed
via DMA would be wrong.
Damn, I thought those programs were not so compiler-dependent :-(
--- Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.12.0
* Origin: Tidorum Ltd (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441