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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Passing a 2d array into a package and returning the same processed 2d back to main Date: Mon, 3 Oct 2016 13:16:59 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <44638b2d-c7fb-4113-9262-d57dd1cd5629@googlegroups.com> <241a25d0-e840-4d2f-b39f-e5bcdf9a6209@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 3 Oct 2016 20:16:48 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6df4b173985f7c5c043cea362c370ff7"; logging-data="3566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YSqF4l1W+IjkuxY7v+1XlXPy9Ts7Fnfo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 In-Reply-To: <241a25d0-e840-4d2f-b39f-e5bcdf9a6209@googlegroups.com> Cancel-Lock: sha1:cb13wCvJMgMdk8atXHJRJ+oJ1xQ= Xref: news.eternal-september.org comp.lang.ada:31981 Date: 2016-10-03T13:16:59-07:00 List-Id: On 10/03/2016 11:36 AM, James Brewer wrote: > > TYPE MY_ARRAY IS ARRAY(INTEGER RANGE <>, INTEGER RANGE <>) OF Boolean; > > Array2d: ARRAY (1..N, 1..N) OF Boolean; Your code has lots of problems, but an obvious reason why it doesn't work is that your procedure takes parameters of type My_Array, but the object you pass in twice has the anonymous array type of its declaration. These are 2 different types, and you can't use one where the other is required. -- Jeff Carter "We'll make Rock Ridge think it's a chicken that got caught in a tractor's nuts!" Blazing Saddles 87