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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.237.41.231 with SMTP id o94mr272807qtd.47.1475697186886; Wed, 05 Oct 2016 12:53:06 -0700 (PDT) X-Received: by 10.157.39.131 with SMTP id c3mr1263864otb.15.1475697186843; Wed, 05 Oct 2016 12:53:06 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.fcku.it!peer03.fr7!futter-mich.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g45no216941qte.1!news-out.google.com!203ni964itk.0!nntp.google.com!o19no325921ito.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 5 Oct 2016 12:53:06 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:2c4:101:d816:d1dc:87b4:993b:ab39; posting-account=bfqYCQoAAADhOBV9jx08D2gm5EA72sgj NNTP-Posting-Host: 2601:2c4:101:d816:d1dc:87b4:993b:ab39 References: <44638b2d-c7fb-4113-9262-d57dd1cd5629@googlegroups.com> <241a25d0-e840-4d2f-b39f-e5bcdf9a6209@googlegroups.com> <23322f1c-76c2-4ab5-8098-421a3394bc04@googlegroups.com> <1410516a-584f-4fb1-94a2-57bb9ee80a57@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1010051e-eb15-454e-bbe1-5b210fb9f7dd@googlegroups.com> Subject: Re: Passing a 2d array into a package and returning the same processed 2d back to main From: James Brewer Injection-Date: Wed, 05 Oct 2016 19:53:06 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 1764736827 X-Received-Bytes: 2718 Xref: news.eternal-september.org comp.lang.ada:32001 Date: 2016-10-05T12:53:06-07:00 List-Id: On Wednesday, October 5, 2016 at 1:57:08 PM UTC-5, Jeffrey R. Carter wrote: > On 10/05/2016 10:19 AM, James Brewer wrote: > > > > Well, I thought it worked by I'm just getting 1's for the output. >=20 > How value do you input when asked "How many nodes need to be processed? "= If=20 > it's less than 9, the remaining elements in the array will have random va= lues=20 > ("stack junk") which will probably be True at least half the time. Since = your=20 > algorithm processes all the elements in the 9x9 array, the odds are good = that=20 > every node will end up being True. >=20 > The correction is not to declare the array until you know how big it need= s to be. >=20 > --=20 > Jeff Carter > "You can never forget too much about C++." > 115 Please remember I'm just starting in this language. So if I say anything ri= diculous it is not intentional. It doesn't seem to allow for declarations a= fter the "begin" statement. Also, it worked without the package implementat= ion as best as I could tell with my test data.