comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: How discriminants interplay with derived tagged types?
Date: Tue, 28 Nov 2017 10:44:17 -0800 (PST)
Date: 2017-11-28T10:44:17-08:00	[thread overview]
Message-ID: <7a29110c-c738-478d-82a5-0f2f797ef518@googlegroups.com> (raw)
In-Reply-To: <ovfh2i$127m$1@gioia.aioe.org>

Am Montag, 27. November 2017 00:00:39 UTC+1 schrieb Victor Porton:
> Please explain how discriminants and derived tagged types interplay.

Just try to figure out in which sequence the components in T4 appear, i.e. in which sequence you would have to write them down in a positional aggregate for an object of type T4:

type T (D: Discriminant) is tagged record
  <T-Components>
end record;

type T1 is new T (D => X) with record
  <T1-Components>
end record;

type T2 (D2: Discr) is new T1 with record
  <T2-Components>
end record;

type T3 (D4: Diskr; D3: Diskr_3) is new T2 (D2 => D4) with record
  <T3-Components>
end record;

type T4 is new T3 with record
  <T4-Components>
end record;

(Hint: Discr. appear first.)

      parent reply	other threads:[~2017-11-28 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 23:00 How discriminants interplay with derived tagged types? Victor Porton
2017-11-27  8:32 ` Dmitry A. Kazakov
2017-11-28  1:57 ` Randy Brukardt
2017-11-28 18:44 ` AdaMagica [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox