From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Record type as generic parameter
Date: 13 Aug 2009 12:30:38 +0200
Date: 2009-08-13T12:30:38+02:00 [thread overview]
Message-ID: <87zla4m2ep.fsf@jspa-nykredit.sparre-andersen.dk> (raw)
In-Reply-To: 2698b15a-7a94-45b5-90af-d0fb5929b1cf@w41g2000yqb.googlegroups.com
Gautier wrote:
> [...] Then, my favourite Ada compiler doesn't want a record as
> generic parameter:
>
> generic
> type Scenario is range <>;
> type Association is record
> scen: Scenario;
> it : Item;
> end record;
> scenario_definition: array(Positive range <>) of Association;
> procedure Fill_Scenarios;
>
> Any nice workaround ?
A private type. With functions for accessing the fields, if necessary.
Greetings,
Jacob
--
<URL: small-talk://work/hallway-meeting/...>
prev parent reply other threads:[~2009-08-13 10:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 9:52 Record type as generic parameter Gautier write-only
2009-08-13 10:23 ` Jean-Pierre Rosen
2009-08-13 13:34 ` Gautier write-only
2009-08-13 10:30 ` Jacob Sparre Andersen [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