From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Arrays, slices, case, and ‘in’ strategies
Date: Sat, 30 Dec 2017 10:58:46 +0100
Date: 2017-12-30T10:58:46+01:00 [thread overview]
Message-ID: <p27o0n$683$1@dont-email.me> (raw)
In-Reply-To: <1c10eec9-040c-4d50-a557-11325883529a@googlegroups.com>
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
next prev parent reply other threads:[~2017-12-30 9:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-30 0:51 Arrays, slices, case, and ‘in’ strategies Mace Ayres
2017-12-30 8:34 ` Jacob Sparre Andersen
2017-12-30 17:20 ` Mace Ayres
2017-12-30 17:30 ` Mace Ayres
2017-12-30 9:58 ` Jeffrey R. Carter [this message]
2017-12-30 17:32 ` Mace Ayres
2017-12-30 10:55 ` Simon Wright
2017-12-30 17:12 ` Mace Ayres
2017-12-30 17:41 ` Simon Wright
2017-12-30 23:52 ` Mace Ayres
2017-12-31 9:09 ` Simon Wright
2017-12-31 20:14 ` Robert Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox