comp.lang.ada
 help / color / mirror / Atom feed
From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Problem with generic parameter
Date: 22 Jun 2005 15:09:01 +0200
Date: 2005-06-22T15:09:01+02:00	[thread overview]
Message-ID: <m21x6u7d3m.fsf@hugin.crs4.it> (raw)
In-Reply-To: mailman.82.1119441536.17633.comp.lang.ada@ada-france.org

Marius Amado Alves wrote:

> I think this is legal,

Thanks.

> so the compiler is buggy.

:-(

> But I find it an unlogical generic idiom, and probably the bug has
> passed unnoticed before for this reason. That is, nobody wrote this
> before. What I find unlogical is the Generic_Root.Child
> parameters. I would find it logical to represent the array type as
> an exported entity instead of a generic parameter.
> 
> generic
>     type Indices is (<>);
> package Generic_Root
>     type Measurement is array (Indices) of Measurement;

The reason that I don't do that is that that would have to instantiate
a copy of Generic_Root _and_ Generic_Root.Child for each choice of
array indices.

I will report the problem to ACT and Debian. - And use your suggestion
as a workaround.

Jacob
-- 
Would you also prefer not to have had to read Victor Hugo?
Vote for EU software patents!

http://www.guardian.co.uk/online/comment/story/0,12449,1510566,00.html



  reply	other threads:[~2005-06-22 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 10:21 Problem with generic parameter Jacob Sparre Andersen
2005-06-22 11:16 ` Martin Dowie
2005-06-22 11:58 ` Marius Amado Alves
2005-06-22 13:09   ` Jacob Sparre Andersen [this message]
2005-06-22 14:26     ` Marius Amado Alves
     [not found] ` <f6af3631a69872fe2f46258f86b08473@netcabo.pt>
2005-06-22 12:43   ` Marius Amado Alves
replies disabled

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