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-27 18:51:20 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: 27 Jan 2003 18:51:20 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0301271851.7c907f60@posting.google.com> References: <5ad0dd8a.0301270746.6ad4c4b0@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 1043722280 16220 127.0.0.1 (28 Jan 2003 02:51:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 28 Jan 2003 02:51:20 GMT Xref: archiver1.google.com comp.lang.ada:33471 Date: 2003-01-28T02:51:20+00:00 List-Id: "James S. Rogers" wrote in message news:... > If you want to use a more general access to string try using an access > to an unbounded string. See the following: Uhm, I switched to String from Stream_Element_Array because the old GNAT code example used it. In my project there is something like this: subtype Content_Length_Type is Stream_Element_Count range 0 .. 2 ** 16 - 1; subtype Padding_Length_Type is Stream_Element_Count range 0 .. 2 ** 8 - 1; type Content_Type ( Content_Length : Content_Length_Type; Padding_Length : Padding_Length_Type ) is record Content : aliased Stream_Element_Array( 1..Content_Length ); case Padding_Length is when 0 => null; when others => Padding : Stream_Element_Array( 1..Padding_Length ); end case; end record; First I read a header with Content_Length and Padding_Length from socket, then I use declare to read the actual content in another syscall. Then I wanted to pass the access to Content to a function that accepts access Stream_Element_Array as its parameter. Looks like this cannot be done though. And in general I find the inablility to declare access type subtypes in parallel with the subtypes for the designated type obstructive. Thanks, Wojtek