comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve" <nospam_steved94@comcast.net>
Subject: Re: How to define an array of a variant record type?
Date: Tue, 18 Nov 2003 02:48:54 GMT
Date: 2003-11-18T02:48:54+00:00	[thread overview]
Message-ID: <qMfub.229417$Tr4.680319@attbi_s03> (raw)
In-Reply-To: mailman.17.1069090659.3110.comp.lang.ada@ada-france.org

"Marius Amado Alves" <amado.alves@netcabo.pt> wrote in message
news:mailman.17.1069090659.3110.comp.lang.ada@ada-france.org...
> To simulate arrays of indefinite or unconstrained elements in Ada you
> must use pointers (access types). Define an access type to your logical
> type, then define an array of such pointers. Your life will be slightly
> facilitated as Ada provides implicit dereference in most situations.
>

Dynamic allocation is inherently more risky (having potential for memory
leaks) than simply using a discriminated record with a default discriminant.

Steve
(The Duck)





  reply	other threads:[~2003-11-18  2:48 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 [this message]
2003-11-18  9:04     ` Marius Amado Alves
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