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-7-bit X-Google-Thread: 103376,6d748e86b56b1269 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-28 04:14:10 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Prefix to 'ACCESS must either statically match... But why? Date: 28 Jan 2003 04:14:09 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0301280414.6ac8d45e@posting.google.com> References: <5ad0dd8a.0301270746.6ad4c4b0@posting.google.com> <5ad0dd8a.0301271851.7c907f60@posting.google.com> NNTP-Posting-Host: 212.160.20.107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1043756050 29270 127.0.0.1 (28 Jan 2003 12:14:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 28 Jan 2003 12:14:10 GMT Xref: archiver1.google.com comp.lang.ada:33482 Date: 2003-01-28T12:14:10+00:00 List-Id: > Why are you choosing to pass an access to a Stream_Element_Array > instead of just the Stream_Element_Array? Avoiding the use of an > access type would also eliminate the problem. Remember that any > parameter, even an IN parameter can be passed by reference by the > compiler. In fact, an array object is most frequently passed by > reference. Because this function uses 'Unrestricted_Access to return an array of accecceses to slices of the parameter array. This is supposed to yeld in better speed and compactness, and let me avoid heap allocations. If I were to copy the strings out of this huge array I'd have to allocate them on heap. >> And in general I find the inablility to declare access type >> subtypes in parallel with the subtypes for the designated >> type obstructive. > > It appears that you are thinking in C while programming in Ada. Heh, maybe. Please take a look at my other post - even the compilers are unsure if what I've written is Ada ;-) Thanks, Wojtek