From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!xmission!2.eu.feeder.erje.net!feeder.erje.net!porbandar.httrack.net!news.httrack.net!pasdenom.info!.POSTED.2a01:e0a:472:70f0:489f:9b4f:758a:47b3!not-for-mail From: DrPi <314@drpi.fr> Newsgroups: comp.lang.ada Subject: Map iteration and modification Date: Thu, 28 Dec 2023 14:53:16 +0100 Organization: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 28 Dec 2023 13:53:17 -0000 (UTC) Injection-Info: rasp.pasdenom.info; posting-account="314@usenet"; posting-host="2a01:e0a:472:70f0:489f:9b4f:758a:47b3"; logging-data="10137"; mail-complaints-to="abuse@pasdenom.info" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:t3tVRSIex67V4mnxyF0l0qg0bjs= sha256:kIs6qjhAWyT+tR/YICSmOhyp7uvu7O7I9VSyOz+7YVk= sha1:V9tFAon6DcBaYRdAhxnR3xKE518= sha256:Xp3XlmKOKbLzJsm5I+DyYeoRGGp3c4h56kKy6gYmViA= Content-Language: fr, en-US Xref: news.eternal-september.org comp.lang.ada:65933 List-Id: Hi, I need to delete nodes from a Hashed_Map. I don't know which nodes to delete in advance. I have to iterate on the Map keys and delete the nodes which fulfill a condition. From the LRM I understand I can't delete nodes within a loop iterating the Map nodes. That makes sense. What's the recommended way of doing this ? Iterate the Map and temporarily store the key nodes to be deleted then delete the nodes from the key list ? Nicolas