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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z17g2000prz.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Properties Date: Sat, 4 Dec 2010 10:53:41 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> <4pnv7nl4cdui$.1n28i7lqk4mek$.dlg@40tude.net> <1k7367gtebsgm$.18auo6u3nfg34.dlg@40tude.net> <083addb2-61f6-4a69-bb81-2e4fa640783b@e16g2000pri.googlegroups.com> <124c5qinlvj7c$.1pdr35p7hkp11.dlg@40tude.net> <75475874-cd6c-4e75-8a2f-7675ecf0864a@f20g2000vbc.googlegroups.com> <82c5fa21-953e-45a9-855e-7ac2609281b9@f21g2000prn.googlegroups.com> NNTP-Posting-Host: 174.28.198.93 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1291488821 25177 127.0.0.1 (4 Dec 2010 18:53:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 4 Dec 2010 18:53:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z17g2000prz.googlegroups.com; posting-host=174.28.198.93; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16774 Date: 2010-12-04T10:53:41-08:00 List-Id: On Dec 4, 7:23=A0am, "Peter C. Chapin" wrote: > On 2010-12-04 00:35, Shark8 wrote: > > > Just a quick question, but why was it necessary to have two sets of > > containers, one for the indefinates and one for the definites? > > Each instance of an indefinite type can have different sizes. For example > > procedure Example is > =A0 =A0S1 : String(1 .. 10); > =A0 =A0S2 : String(1 .. 100); > begin > =A0 null; > end Example; > > S1 and S2 occupy different amounts of memory. The indefinite containers > deal with this by using access values internally. That is an indefinite > vector of strings actually stores String access values (pointers) and > manages that extra indirection internally so you aren't exposed to it. > This allows strings of different sizes to be stored in the vector in a > uniform way. The price is extra overhead and slightly less efficiency. > > Class wide types are also indefinite because an instance of a class wide > type can be one of several different types in the class (all with > potentially different sizes). > > Peter Ok, I suspected this was the answer but wanted to make sure. Thank you for verifying it.