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,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-25 14:31:17 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Prefix to 'ACCESS must either statically match... But why? Date: 25 Jan 2003 14:31:17 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0301251431.6370c6bc@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 1043533877 23863 127.0.0.1 (25 Jan 2003 22:31:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 Jan 2003 22:31:17 GMT Xref: archiver1.google.com comp.lang.ada:33429 Date: 2003-01-25T22:31:17+00:00 List-Id: Hello, Could somebody please explain me why is this rule present? I find it very limting. Is this because AR2 bounds are not stored with the object? Type Stream_Element_Array_access is access all Stream_Element_Array; AR1 : aliased Stream_Element_Array := ( 2, 4, 5 ); AR2 : aliased Stream_Element_Array ( 1 .. 3 ) := ( 2, 4, 5 ); AR1A : Stream_Element_Array_access := AR1'access; -- Illegal AR2A : Stream_Element_Array_access := AR2'access; LRM:3.10.2(27), The nominal subtype of the prefix to 'ACCESS or 'UNCHECKED_ACCESS must either statically match the designated subtype of the expected type or the designated subtype must be discriminated and unconstrained, Continuing Thanks, Wojtek