From: John Perry <john.perry@usm.edu>
Subject: Re: advent of code day 11
Date: Fri, 11 Dec 2020 15:49:39 -0800 (PST) [thread overview]
Message-ID: <69c222d7-6a2b-4de7-87c5-133f6ea53952n@googlegroups.com> (raw)
In-Reply-To: <eb14771e-910b-4ad7-bad9-00928a4eb10fn@googlegroups.com>
On Friday, December 11, 2020 at 1:29:58 PM UTC-6, gautier...@hotmail.com wrote:
> The ":=" makes a complete copy of the arrays.
That's what I was afraid of.
> Of course it feels a bit heavy to make all those copies. And you understandably want to avoid playing with pointers.
Exactly!
So a solution is to define:
> Map : array (0 .. 1) of Chart_Array;
> ...
> current := 0;
> loop
> next := 1 - current;
> Perform_Round( Source => Map (current), Result => Map (next) , ... );
> current := next;
> end loop;
This is a nice alternative, thanks.
next prev parent reply other threads:[~2020-12-11 23:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 17:07 advent of code day 11 Stephen Leake
2020-12-11 18:24 ` John Perry
2020-12-11 19:07 ` Jeffrey R. Carter
2020-12-11 19:29 ` gautier...@hotmail.com
2020-12-11 19:35 ` gautier...@hotmail.com
2020-12-11 22:40 ` Jeffrey R. Carter
2020-12-11 23:45 ` John Perry
2020-12-11 23:49 ` John Perry [this message]
2020-12-12 9:38 ` Maxim Reznik
2020-12-12 20:27 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox