From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_20 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a0c:bd2b:: with SMTP id m43mr18308392qvg.32.1607730580462; Fri, 11 Dec 2020 15:49:40 -0800 (PST) X-Received: by 2002:ac8:41cf:: with SMTP id o15mr18665963qtm.98.1607730580322; Fri, 11 Dec 2020 15:49:40 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 11 Dec 2020 15:49:39 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2601:3c3:401:f550:426d:b815:62d9:71b3; posting-account=JSxOkAoAAADa00TJoz2WZ_46XrZCdXeS NNTP-Posting-Host: 2601:3c3:401:f550:426d:b815:62d9:71b3 References: <86mtykp8yd.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <69c222d7-6a2b-4de7-87c5-133f6ea53952n@googlegroups.com> Subject: Re: advent of code day 11 From: John Perry Injection-Date: Fri, 11 Dec 2020 23:49:40 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:60809 List-Id: 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.