comp.lang.ada
 help / color / mirror / Atom feed
From: john.nospam@nospamassen.nospamdemon.co.uk (John McCabe)
Subject: Re: can a record contain an array whose bounds are not known at co  mpi le time?
Date: Fri, 25 Oct 2002 14:55:44 GMT
Date: 2002-10-25T14:55:44+00:00	[thread overview]
Message-ID: <3db95b2c.25114312@news.demon.co.uk> (raw)
In-Reply-To: mailman.1035556862.8402.comp.lang.ada@ada.eu.org

On Fri, 25 Oct 2002 15:40:08 +0100, Caldwell Ian
<ICCALDWELL@qinetiq.com> wrote:

Also read about mutable and immutable types - these depend on whether
you have a default discriminant I think.

>Use a discriminated type. See RM section 3.7;
>
>An examples of discriminated type:
>
>type Buffer(Size : Buffer_Size := 100)  is       
>   record
>      Value : String(1 .. Size);
>   end record;
>
>Ian Caldwell
>Q218 
>QinetiQ Malvern 
>+ 44 (0) 1684 89 4461
>
>-----Original Message-----
>From: Yu, Liyang [mailto:Liyang.Yu@delta.com]
>
>
>Hi,
>
>I need to use an array in a record and this array's bound is not known at
>compile time. Can Ada do this? Can someone give me a example about how to do
>this or any reference that I can use?
>
>Thanks!
>
>The Information contained in this E-Mail and any subsequent correspondence
>is private and is intended solely for the intended recipient(s).
>For those other than the recipient any disclosure, copying, distribution,
>or any action taken or omitted to be taken in reliance on such information
>is prohibited and may be unlawful.




      reply	other threads:[~2002-10-25 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-25 14:40 can a record contain an array whose bounds are not known at co mpi le time? Caldwell Ian
2002-10-25 14:55 ` John McCabe [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