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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f63c66b1f04412d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-17 18:48:55 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!attbi_s03.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: How to define an array of a variant record type? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: NNTP-Posting-Host: 12.211.58.135 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s03 1069123734 12.211.58.135 (Tue, 18 Nov 2003 02:48:54 GMT) NNTP-Posting-Date: Tue, 18 Nov 2003 02:48:54 GMT Organization: Comcast Online Date: Tue, 18 Nov 2003 02:48:54 GMT Xref: archiver1.google.com comp.lang.ada:2606 Date: 2003-11-18T02:48:54+00:00 List-Id: "Marius Amado Alves" 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)