From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:622a:1986:b0:343:225d:f9e1 with SMTP id u6-20020a05622a198600b00343225df9e1mr4703761qtc.651.1663340428765; Fri, 16 Sep 2022 08:00:28 -0700 (PDT) X-Received: by 2002:a05:622a:64a:b0:35c:ba73:e1ae with SMTP id a10-20020a05622a064a00b0035cba73e1aemr4698475qtb.452.1663340428479; Fri, 16 Sep 2022 08:00:28 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 16 Sep 2022 08:00:28 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=149.90.69.202; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY NNTP-Posting-Host: 149.90.69.202 References: <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Non-standard functions in GNAT's Ada.Containers packages? From: Marius Amado-Alves Injection-Date: Fri, 16 Sep 2022 15:00:28 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1914 Xref: reader01.eternal-september.org comp.lang.ada:64339 List-Id: > >> "for X of M loop ... end loop". > > > > Not possible for maps. > but you can as > >https://programming-idioms.org/idiom/13/iterate-over-map-keys-and-value/1511/ada> > > with Ada.Containers.Indefinite_Hashed_Maps; > with Ada.Strings.Hash; > use Ada.Containers; > for C in My_Map.Iterate loop > Put_Line ("Key = " & Key (C) & ", Value = " & Element (C)); > end loop; Thanks, but this is "in", not "of", requires cursors, and DOES NOT COMPILE, as probably needs like ten lines of boiler plate not show.