From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,272d4fbcd748af2b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-25 07:51:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: john.nospam@nospamassen.nospamdemon.co.uk (John McCabe) Newsgroups: comp.lang.ada 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 Message-ID: <3db95b2c.25114312@news.demon.co.uk> References: NNTP-Posting-Host: pipehawk.demon.co.uk X-Trace: news.demon.co.uk 1035557502 10821 158.152.226.81 (25 Oct 2002 14:51:42 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 25 Oct 2002 14:51:42 +0000 (UTC) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:30131 Date: 2002-10-25T14:55:44+00:00 List-Id: On Fri, 25 Oct 2002 15:40:08 +0100, Caldwell Ian 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.