comp.lang.ada
 help / color / mirror / Atom feed
From: Caldwell Ian <ICCALDWELL@qinetiq.com>
Subject: can a record contain an array whose bounds are not known at   co 	mpi	le time?
Date: Fri, 25 Oct 2002 15:40:08 +0100
Date: 2002-10-25T15:40:08+01:00	[thread overview]
Message-ID: <mailman.1035556862.8402.comp.lang.ada@ada.eu.org> (raw)

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:40 UTC|newest]

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

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