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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,feb9db77c9b5b310,start X-Google-Attributes: gid103376,public From: John Harbaugh Subject: Access to Unconstrained Arrays Date: 1997/04/16 Message-ID: <335507B4.7A03@boeing.com>#1/1 X-Deja-AN: 235240841 Sender: nntp@news.boeing.com (Boeing NNTP News Access) X-Nntp-Posting-Host: elaptop.knt.boeing.com Organization: Boeing Defense and Space Group - Employee Training Newsgroups: comp.lang.ada Date: 1997-04-16T00:00:00+00:00 List-Id: When trying to pass pointers to objects of unconstrained array type, I am getting confusing compiler errors. For example: procedure Main is type Lists is array(Natural range <>) of Integer; type Lists_Ptrs is access all Lists; procedure Do_Something(To : in out Lists_Ptrs) is... List1 : Lists(1..4) := (1,2,3,4); List2 : Lists := (1,2,3,4); begin Do_Something(To => List1); -- Compilation Error. Why? Do_Something(To => List2); -- No problemo!!! end Main; List1 should be an anonymous constrained subtype of type Lists. I was under the impression that subtypes are simply a subset of their base type. Is this not the case for constrained subtypes of unconstrained types? Thanks in advance for any who may respond. - John