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 X-Google-Thread: 103376,d67ca8d922a33c8a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-02 14:29:18 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news-lond.gip.net!news.gsl.net!gip.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stoc.telia.net!news-stoa.telia.net!telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Heterogenous array References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: <_U71c.51050$mU6.207186@newsb.telia.net> Date: Tue, 02 Mar 2004 22:29:14 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1078266554 217.209.116.179 (Tue, 02 Mar 2004 23:29:14 CET) NNTP-Posting-Date: Tue, 02 Mar 2004 23:29:14 CET Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:6018 Date: 2004-03-02T22:29:14+00:00 List-Id: Steve wrote: > The way I look at it, the default descriminant is a way of telling the > compiler you may want to assign a record with a different discriminant = value > to a record you have declared. That way enough memory is allocated to = hold > the largest variant. If you don't give a default descriminant, that te= lls > the compiler you're going to explicitly select the variant for each rec= ord > you declare, so it can size each variant in the smallest allocation - w= ith > the restriction that you cannot assign a different variant after the > declaration. Okay, after some experimentation I understand the difference, but I=20 can't help thinking that it seems somewhat unlike Ada to say "make the=20 discriminant immutable in all objects of this type" by not giving it a=20 default value. Putting a "constant" somewhere would have been more=20 intuitive. Oh well, now I know how to do what I want. Thanks again! --=20 Bj=F6rn Persson jor ers @sv ge. b n_p son eri nu