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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c56a86f3a4e16d06 X-Google-Attributes: gid103376,public From: Wolfgang Jeltsch Subject: Re: Containers with Ada Date: 2000/11/20 Message-ID: <8vc8c0$4oi$1@nnrp1.deja.com>#1/1 X-Deja-AN: 695926520 References: <8v8pii$dvo$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x54.deja.com:80 (Squid/1.1.22) for client 212.162.20.114 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Nov 20 22:25:14 2000 GMT X-MyDeja-Info: XMYDJUIDjeltsch Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.74 [de] (X11; U; Linux 2.2.16 i586) Date: 2000-11-20T00:00:00+00:00 List-Id: > There's nothing in the standard that requires this for the _exact_ > example you post, AFAIK. If you really think you're seeing this, you > may want to contact GNAT. Note that replacing "Length : Natural" with > "Length : Natural := 0" will cause the behavior you describe, as well > as a potential GNAT message - "warning: creation of object of this > type may raise Storage_Error.". That _is_ consistent with the > standard. Sorry, I didn't remember that the problems with memory consumption I had arose when I used a default value for Length. In my original List implementation this was needed for growable lists: type Element_Array is array(Positive range <>); type Buffer(Size : Natural := Init_Size) is record Elements : Element_Array(1 .. Size); end record; type Growable_List is record Element_Buffer : Buffer; Real_Size : Natural :=0; end record; This example is not possible with GNAT why I have to use references to the buffer why Growable_List must be a controlled type. Sent via Deja.com http://www.deja.com/ Before you buy.