comp.lang.ada
 help / color / mirror / Atom feed
From: Marius Amado Alves <amado.alves@netcabo.pt>
To: comp.lang.ada@ada-france.org
Subject: Re: How to define an array of a variant record type?
Date: Tue, 18 Nov 2003 09:04:42 +0000
Date: 2003-11-18T09:04:42+00:00	[thread overview]
Message-ID: <mailman.21.1069146286.3110.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <qMfub.229417$Tr4.680319@attbi_s03>

On Tue, 2003-11-18 at 02:48, Steve wrote:
> "Marius Amado Alves" <amado.alves@netcabo.pt> wrote:
> > To simulate arrays of indefinite or unconstrained elements in Ada you
> > must use pointers...
> Dynamic allocation is inherently more risky (having potential for memory
> leaks) than simply using a discriminated record with a default discriminant.

You're right. Default discriminants is a better way for arrays of
variant records. I had forgotten such types are definite (and can
therefore be array components).




  reply	other threads:[~2003-11-18  9:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-17 16:57 How to define an array of a variant record type? Harald Schmidt
2003-11-17 17:35 ` Stephen Leake
2003-11-20 10:02   ` Craig Carey
2003-11-17 17:37 ` Marius Amado Alves
2003-11-18  2:48   ` Steve
2003-11-18  9:04     ` Marius Amado Alves [this message]
2003-11-17 18:45 ` Rodrigo Garcia
2003-11-18  2:48 ` Steve
2003-11-18 17:48 ` Nick Roberts
2003-11-19  2:38   ` Steve
2003-11-19  8:11     ` Preben Randhol
2003-11-19 13:26   ` Rodrigo Garcia
replies disabled

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