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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: =?UTF-8?B?UmU6IEFycmF5cywgc2xpY2VzLCBjYXNlLCBhbmQg4oCYaW7igJkgc3Ry?= =?UTF-8?Q?ategies?= Date: Sat, 30 Dec 2017 10:58:46 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1c10eec9-040c-4d50-a557-11325883529a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 30 Dec 2017 09:58:47 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ee1c872f5e4feee636df28ba8d46ba4a"; logging-data="6403"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VY5ASzt52/6JdHTMlQumb89MlymnhFoQ=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 In-Reply-To: <1c10eec9-040c-4d50-a557-11325883529a@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:FBvtPZI+ahESTyHPhHO3lh43ZGk= Xref: reader02.eternal-september.org comp.lang.ada:49693 Date: 2017-12-30T10:58:46+01:00 List-Id: On 12/30/2017 01:51 AM, Mace Ayres wrote: > > I know I could create some triad types of arrays, but I am wondering if I can slice the array grid into 9 collections and then check > loop.. if numb (proposed number) already exists in the triad [this would be determined by row, column in parameters) OR also, the cell/record has a field with its triad, > a constant property. You could create a function: function Block (Row : Row_Number; Column : Column_Number) return Block_Number; or a map: type Block_Map is array (Row_Number, Column_Number) of Block_Number; Block : constant Block_Map := ...; both of which would be used as Block (Row, Column) -- Jeff Carter "C's solution to this [variable-sized array parameters] has real problems, and people who are complaining about safety definitely have a point." Dennis Ritchie 25