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-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 04 Dec 2010 08:23:44 -0600 Date: Sat, 04 Dec 2010 09:23:17 -0500 From: "Peter C. Chapin" Organization: Vermont Technical College User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Properties 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> In-Reply-To: <82c5fa21-953e-45a9-855e-7ac2609281b9@f21g2000prn.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-OgpL69/CkWT3PGvFkpycJvX9FKqOs+GNzEdCxptP8arpUtTGVCJRvvTw2aARUSAFsyp7o+Qk0XF43Qs!BbvuMUVmtqx4oKYEqiZqalBWnwU8FNCQ7m4GAm2eTK3rwGpQLD0oSeMIecGmGKA= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2808 Xref: g2news1.google.com comp.lang.ada:15800 Date: 2010-12-04T09:23:17-05:00 List-Id: 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 S1 : String(1 .. 10); S2 : String(1 .. 100); begin 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