Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Gotcha, you snot-necked weenies!" -- Post Bros. Comics


devel / comp.lang.ada / Re: Non-standard functions in GNAT's Ada.Containers packages?

SubjectAuthor
* Non-standard functions in GNAT's Ada.Containers packages?G.B.
`* Re: Non-standard functions in GNAT's Ada.Containers packages?Egil H H
 `* Re: Non-standard functions in GNAT's Ada.Containers packages?G.B.
  `* Re: Non-standard functions in GNAT's Ada.Containers packages?Marius Amado-Alves
   `* Re: Non-standard functions in GNAT's Ada.Containers packages?Niklas Holsti
    `* Re: Non-standard functions in GNAT's Ada.Containers packages?Marius Amado-Alves
     +* Re: Non-standard functions in GNAT's Ada.Containers packages?Dmitry A. Kazakov
     |`* Re: Non-standard functions in GNAT's Ada.Containers packages?Marius Amado-Alves
     | `* Re: Non-standard functions in GNAT's Ada.Containers packages?Marius Amado-Alves
     |  `- Re: Non-standard functions in GNAT's Ada.Containers packages?Jere
     +* Re: Non-standard functions in GNAT's Ada.Containers packages?Björn Lundin
     |`* Re: Non-standard functions in GNAT's Ada.Containers packages?Marius Amado-Alves
     | +- Re: Non-standard functions in GNAT's Ada.Containers packages?Egil H H
     | `- Re: Non-standard functions in GNAT's Ada.Containers packages?Björn Lundin
     `- Re: Non-standard functions in GNAT's Ada.Containers packages?Jere

1
Non-standard functions in GNAT's Ada.Containers packages?

<tfshro$2umbi$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8740&group=comp.lang.ada#8740

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bauhaus@notmyhomepage.invalid (G.B.)
Newsgroups: comp.lang.ada
Subject: Non-standard functions in GNAT's Ada.Containers packages?
Date: Wed, 14 Sep 2022 14:36:07 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <tfshro$2umbi$1@dont-email.me>
Reply-To: nonlegitur@notmyhomepage.de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 14 Sep 2022 12:36:08 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="c65fd136a8d82416f5bf8c62f7da4e6b";
logging-data="3103090"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yoN0cDKOhPX4OWrtWRinjrpP14KbEgXE="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.13.0
Cancel-Lock: sha1:2lmIwfQx7QUnYnXC/KPgPP8GSEg=
Content-Language: en-US
 by: G.B. - Wed, 14 Sep 2022 12:36 UTC

In Ada.Containers.{Kind}s of GCC 11.2, I find functions defined
by the pattern:

function Empty (Capacity : Count_Type := 1000) return {Kind};

I couldn't find these functions in the LRM's package specifications.

Upon type derivation, then, these functions appear to require
non-portable source text when using GNAT's standard Ada
containers. For example,

package Real_Vectors is new Ada.Containers.Vectors (...);
type Fancy_Vectors is new Real_Vectors.Vector with private;

18. type Fancy_Vectors is new Real_Vectors.Vector with record
|
>>> type must be declared abstract or "Empty" overridden
>>> "Empty" has been inherited at line 14
>>> "Empty" has been inherited from subprogram at a-convec.ads:125, instance at line 8

While composition would not incur this effect, etc. etc., still
the resulting source text would need to override a "standard" function,
but this function, Empty, might not exist at all when using other
standard Ada compilers.

Am I missing something?

Re: Non-standard functions in GNAT's Ada.Containers packages?

<d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8741&group=comp.lang.ada#8741

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:424c:b0:6be:78d5:ec73 with SMTP id w12-20020a05620a424c00b006be78d5ec73mr26434806qko.579.1663171484683;
Wed, 14 Sep 2022 09:04:44 -0700 (PDT)
X-Received: by 2002:ac8:7dd6:0:b0:35b:ae11:4a2 with SMTP id
c22-20020ac87dd6000000b0035bae1104a2mr17737940qte.170.1663171484504; Wed, 14
Sep 2022 09:04:44 -0700 (PDT)
Path: i2pn2.org!i2pn.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: Wed, 14 Sep 2022 09:04:44 -0700 (PDT)
In-Reply-To: <tfshro$2umbi$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=81.167.0.45; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn
NNTP-Posting-Host: 81.167.0.45
References: <tfshro$2umbi$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: ehh.public@gmail.com (Egil H H)
Injection-Date: Wed, 14 Sep 2022 16:04:44 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1637
 by: Egil H H - Wed, 14 Sep 2022 16:04 UTC

On Wednesday, September 14, 2022 at 2:36:11 PM UTC+2, G.B. wrote:
> In Ada.Containers.{Kind}s of GCC 11.2, I find functions defined
> by the pattern:
>
> function Empty (Capacity : Count_Type := 1000) return {Kind};
>
> I couldn't find these functions in the LRM's package specifications.
<snip>
> Am I missing something?

They're part of Ada 2022, needed for the new container aggregate syntax.

See,
http://www.ada-auth.org/standards/2xrm/html/RM-A-18-5.html
http://www.ada-auth.org/standards/2xrm/html/RM-4-3-5.html

Re: Non-standard functions in GNAT's Ada.Containers packages?

<tfujbn$38ptt$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8743&group=comp.lang.ada#8743

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bauhaus@notmyhomepage.invalid (G.B.)
Newsgroups: comp.lang.ada
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
Date: Thu, 15 Sep 2022 09:13:58 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <tfujbn$38ptt$1@dont-email.me>
References: <tfshro$2umbi$1@dont-email.me>
<d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
Reply-To: nonlegitur@notmyhomepage.de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 15 Sep 2022 07:13:59 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="b2a01143132d6d27967a537bd6cbc6cf";
logging-data="3434429"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s+4KdUDcxE3wboW3d7LyzbLBffvI9jZk="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.13.0
Cancel-Lock: sha1:0YZ6cflMpc+4+ZGtyeqrFQvJLys=
In-Reply-To: <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
Content-Language: en-US
 by: G.B. - Thu, 15 Sep 2022 07:13 UTC

On 14.09.22 18:04, Egil H H wrote:
> On Wednesday, September 14, 2022 at 2:36:11 PM UTC+2, G.B. wrote:
>>
>> I couldn't find these functions in the LRM's package specifications.
> <snip>
>> Am I missing something?
>
> They're part of Ada 2022, needed for the new container aggregate syntax.
>
> See,
> http://www.ada-auth.org/standards/2xrm/html/RM-A-18-5.html
> http://www.ada-auth.org/standards/2xrm/html/RM-4-3-5.html

Thanks. As the interface of Ada's containers is chang^H^H^H^H^Hbeing
improved, it seems best to have compilers for pre-202x at hand
in case a program needs Ada 2005 containers or Ada 2012 containers.

Re: Non-standard functions in GNAT's Ada.Containers packages?

<f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8744&group=comp.lang.ada#8744

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:5acc:0:b0:35b:b658:4af8 with SMTP id d12-20020ac85acc000000b0035bb6584af8mr31608qtd.625.1663251977810;
Thu, 15 Sep 2022 07:26:17 -0700 (PDT)
X-Received: by 2002:a05:620a:2844:b0:6b8:5f52:a6b5 with SMTP id
h4-20020a05620a284400b006b85f52a6b5mr204836qkp.351.1663251977625; Thu, 15 Sep
2022 07:26:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Thu, 15 Sep 2022 07:26:17 -0700 (PDT)
In-Reply-To: <tfujbn$38ptt$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=149.90.69.202; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY
NNTP-Posting-Host: 149.90.69.202
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: amado.alves@gmail.com (Marius Amado-Alves)
Injection-Date: Thu, 15 Sep 2022 14:26:17 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1586
 by: Marius Amado-Alves - Thu, 15 Sep 2022 14:26 UTC

> ... it seems best to have compilers for pre-202x at hand
> in case a program needs Ada 2005 containers or Ada 2012 containers. (G.B.)

Sorry, but is all this new stuff not backward-compatible? (Except maybe a teeny thing or two, easy to fix.)

BTW, do the new containers fix map iteration? I'm always stupefied at not being possible to iterate a map like you do a vector.

Thanks.

Re: Non-standard functions in GNAT's Ada.Containers packages?

<jogt5kF4gf3U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8745&group=comp.lang.ada#8745

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news-2.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
Date: Thu, 15 Sep 2022 18:03:16 +0300
Organization: Tidorum Ltd
Lines: 25
Message-ID: <jogt5kF4gf3U1@mid.individual.net>
References: <tfshro$2umbi$1@dont-email.me>
<d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me>
<f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ekBngJoysdzn9XM0tOufDg30EXZMP5P0BbQBSC99WIFh1cFlRy
Cancel-Lock: sha1:hDjS7HV4SDHwD5aCE5/RGBM8ATI=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.2.2
Content-Language: en-US
In-Reply-To: <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
 by: Niklas Holsti - Thu, 15 Sep 2022 15:03 UTC

On 2022-09-15 17:26, Marius Amado-Alves wrote:
>> ... it seems best to have compilers for pre-202x at hand in case a
>> program needs Ada 2005 containers or Ada 2012 containers. (G.B.)
>
> Sorry, but is all this new stuff not backward-compatible? (Except
> maybe a teeny thing or two, easy to fix.)

The incompatibility seems to arise only if one derives from the
container types defined in the library. I don't think that is often
needed in an application.

> BTW, do the new containers fix map iteration? I'm always stupefied at
> not being possible to iterate a map like you do a vector.

Maps supported iteration already in Ada 2005, when the standard
containers were added to Ada. There are functions First and Next, to
give the first map element and to advance from an element to the next
element, and also a procedure Iterate that traverses the whole map and
performs some action on each element. In current Ada, one can also
iterate over a map with the "generalized loop iteration" syntax, as in
"for X of M loop ... end loop".

Re: Non-standard functions in GNAT's Ada.Containers packages?

<6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8746&group=comp.lang.ada#8746

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:4502:b0:6b4:6c2f:e7b7 with SMTP id t2-20020a05620a450200b006b46c2fe7b7mr891285qkp.11.1663261878666;
Thu, 15 Sep 2022 10:11:18 -0700 (PDT)
X-Received: by 2002:ae9:e114:0:b0:6ce:33c9:5cc2 with SMTP id
g20-20020ae9e114000000b006ce33c95cc2mr886242qkm.388.1663261878480; Thu, 15
Sep 2022 10:11:18 -0700 (PDT)
Path: i2pn2.org!i2pn.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: Thu, 15 Sep 2022 10:11:18 -0700 (PDT)
In-Reply-To: <jogt5kF4gf3U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=149.90.69.202; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY
NNTP-Posting-Host: 149.90.69.202
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: amado.alves@gmail.com (Marius Amado-Alves)
Injection-Date: Thu, 15 Sep 2022 17:11:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1520
 by: Marius Amado-Alves - Thu, 15 Sep 2022 17:11 UTC

Thanks, Niklas.

> ... There are functions First and Next ... procedure Iterate ...

Too verbose and error-prone (forget the Next and you get an endless loop).

> "for X of M loop ... end loop".

Not possible for maps.

Re: Non-standard functions in GNAT's Ada.Containers packages?

<tfvn07$1dee$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8747&group=comp.lang.ada#8747

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!epJzlJsZWlp1WuFmYLlBpQ.user.46.165.242.91.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
Date: Thu, 15 Sep 2022 19:22:15 +0200
Organization: Aioe.org NNTP Server
Message-ID: <tfvn07$1dee$1@gioia.aioe.org>
References: <tfshro$2umbi$1@dont-email.me>
<d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me>
<f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net>
<6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="46542"; posting-host="epJzlJsZWlp1WuFmYLlBpQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Thu, 15 Sep 2022 17:22 UTC

On 2022-09-15 19:11, Marius Amado-Alves wrote:
> Thanks, Niklas.
>
>> ... There are functions First and Next ... procedure Iterate ...
>
> Too verbose and error-prone (forget the Next and you get an endless loop).

That is cursors/iterators for you. They are nothing but dressed up
pointers. Should never be there, IMO.

In my containers I use positive index 1..<size> instead.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Non-standard functions in GNAT's Ada.Containers packages?

<tg1mun$3oa4l$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8748&group=comp.lang.ada#8748

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bnl@nowhere.com (Björn Lundin)
Newsgroups: comp.lang.ada
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
Date: Fri, 16 Sep 2022 13:33:43 +0200
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <tg1mun$3oa4l$1@dont-email.me>
References: <tfshro$2umbi$1@dont-email.me>
<d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me>
<f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net>
<6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Sep 2022 11:33:43 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="6b4ce771fba3c91bea5cb1473b29fd63";
logging-data="3942549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IluZsqbxp0DA43D4ous4g"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:TiGg8Jsn6A1rHPvAuuaThJTfaCI=
In-Reply-To: <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
Content-Language: en-US
 by: Björn Lundin - Fri, 16 Sep 2022 11:33 UTC

On 2022-09-15 19:11, Marius Amado-Alves wrote:
> Thanks, Niklas.
>
>> ... There are functions First and Next ... procedure Iterate ...
>
> Too verbose and error-prone (forget the Next and you get an endless loop).
>
>> "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>

shows (as below)

--Access each key k with its value x from an associative array mymap,
-- and print them.

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;

--
/Björn

Re: Non-standard functions in GNAT's Ada.Containers packages?

<a7171ebe-279f-4cc8-9b0d-0db197e42c0bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8751&group=comp.lang.ada#8751

  copy link   Newsgroups: comp.lang.ada
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: i2pn2.org!i2pn.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: <tg1mun$3oa4l$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=149.90.69.202; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY
NNTP-Posting-Host: 149.90.69.202
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net> <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
<tg1mun$3oa4l$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7171ebe-279f-4cc8-9b0d-0db197e42c0bn@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: amado.alves@gmail.com (Marius Amado-Alves)
Injection-Date: Fri, 16 Sep 2022 15:00:28 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1914
 by: Marius Amado-Alves - Fri, 16 Sep 2022 15:00 UTC

> >> "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.

Re: Non-standard functions in GNAT's Ada.Containers packages?

<7c1a505d-9214-40ba-93b7-84afad1e10a3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8753&group=comp.lang.ada#8753

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:bfc5:0:b0:6cd:d800:ab55 with SMTP id p188-20020a37bfc5000000b006cdd800ab55mr4458906qkf.176.1663342926910;
Fri, 16 Sep 2022 08:42:06 -0700 (PDT)
X-Received: by 2002:ae9:c30b:0:b0:6cd:f128:cc88 with SMTP id
n11-20020ae9c30b000000b006cdf128cc88mr4503547qkg.0.1663342926741; Fri, 16 Sep
2022 08:42:06 -0700 (PDT)
Path: i2pn2.org!i2pn.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:42:06 -0700 (PDT)
In-Reply-To: <a7171ebe-279f-4cc8-9b0d-0db197e42c0bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=46.15.217.19; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn
NNTP-Posting-Host: 46.15.217.19
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net> <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
<tg1mun$3oa4l$1@dont-email.me> <a7171ebe-279f-4cc8-9b0d-0db197e42c0bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7c1a505d-9214-40ba-93b7-84afad1e10a3n@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: ehh.public@gmail.com (Egil H H)
Injection-Date: Fri, 16 Sep 2022 15:42:06 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3163
 by: Egil H H - Fri, 16 Sep 2022 15:42 UTC

On Friday, September 16, 2022 at 5:00:29 PM UTC+2, amado...@gmail.com wrote:
> > >> "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.

(sorry for any botched formatting...)

with Ada.Containers.Indefinite_Hashed_Maps;
with Ada.Strings.Hash;
with Ada.Text_IO;

procedure Iteration is
package My_Maps is
new Ada.Containers.Indefinite_Hashed_Maps
(String, Integer, Ada.Strings.Hash, "=");

My_Map : My_Maps.Map;
begin
My_Map.Include("One", 1);
My_Map.Include("Two", 2);
My_Map.Include("Three", 3);

for C in My_Map.Iterate loop
Ada.Text_IO.Put_Line(My_Maps.Key(C) & My_Maps.Element(C)'Image);
end loop;

for Element of My_Map loop
Ada.Text_IO.Put_Line(Element'Image);
end loop;

-- Ada_2022:
-- for (C : My_Maps.Cursor) of My_Map.Iterate loop
-- Ada.Text_IO.Put_Line(My_Maps.Key(C) & My_Maps.Element(C)'Image);
-- end loop Ada_2022;

end Iteration;

I don't know why they left out a two-parameter version of the Iterate procedure for Ada 2022 Maps,
-- for (Key, Element) of My_Map.Iterate loop
would've been nice, just like
-- for (Name, Val) of Ada.Environment_Variables.Iterate(<>) loop

Re: Non-standard functions in GNAT's Ada.Containers packages?

<36c9b75d-2d3b-4882-894d-21c44d8a383fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8754&group=comp.lang.ada#8754

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:5fcd:0:b0:35c:d514:eb86 with SMTP id k13-20020ac85fcd000000b0035cd514eb86mr2167674qta.616.1663343223711;
Fri, 16 Sep 2022 08:47:03 -0700 (PDT)
X-Received: by 2002:a05:620a:4083:b0:6ce:7e02:5cb8 with SMTP id
f3-20020a05620a408300b006ce7e025cb8mr4445680qko.170.1663343223496; Fri, 16
Sep 2022 08:47:03 -0700 (PDT)
Path: i2pn2.org!i2pn.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:47:03 -0700 (PDT)
In-Reply-To: <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.241.104.184; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf
NNTP-Posting-Host: 96.241.104.184
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net> <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <36c9b75d-2d3b-4882-894d-21c44d8a383fn@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: jhb.chat@gmail.com (Jere)
Injection-Date: Fri, 16 Sep 2022 15:47:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2654
 by: Jere - Fri, 16 Sep 2022 15:47 UTC

On Thursday, September 15, 2022 at 1:11:19 PM UTC-4, amado...@gmail.com wrote:
> Thanks, Niklas.
>
> > ... There are functions First and Next ... procedure Iterate ...
>
> Too verbose and error-prone (forget the Next and you get an endless loop).
> > "for X of M loop ... end loop".
> Not possible for maps.

I'm not sure I understand. I tried it in gnat 11 and it compiled just fine:
*************************************************
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Containers.Ordered_Maps;

procedure Program is
package Maps is new Ada.Containers.Ordered_Maps(Integer,Integer);

Map : Maps.Map;

begin

Map.Insert(1,10);
Map.Insert(2,20);
Map.Insert(3,30);
Map.Insert(4,40);

for Element of Map loop
Put_Line(Element'Image);
end loop;
end Program;
*************************************************
Output:
10
20
30
40
*************************************************

Even tried it on some online compilers and it compiled and ran:
IDEONE online compiler: https://ideone.com/H2oEZt

If this isn't what you mean, what is the missing feature.? the "for of" version does work for maps as far as I can tell.

Re: Non-standard functions in GNAT's Ada.Containers packages?

<23ae89d7-3f28-4f14-80bc-af794762c756n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8757&group=comp.lang.ada#8757

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:31a1:b0:6ce:d7be:496b with SMTP id bi33-20020a05620a31a100b006ced7be496bmr264410qkb.192.1663344213948;
Fri, 16 Sep 2022 09:03:33 -0700 (PDT)
X-Received: by 2002:a05:620a:444e:b0:6ce:968b:d460 with SMTP id
w14-20020a05620a444e00b006ce968bd460mr4470115qkp.240.1663344212898; Fri, 16
Sep 2022 09:03:32 -0700 (PDT)
Path: i2pn2.org!i2pn.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 09:03:32 -0700 (PDT)
In-Reply-To: <tfvn07$1dee$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=149.90.69.202; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY
NNTP-Posting-Host: 149.90.69.202
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net> <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
<tfvn07$1dee$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <23ae89d7-3f28-4f14-80bc-af794762c756n@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: amado.alves@gmail.com (Marius Amado-Alves)
Injection-Date: Fri, 16 Sep 2022 16:03:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2526
 by: Marius Amado-Alves - Fri, 16 Sep 2022 16:03 UTC

> That is cursors/iterators for you. They are nothing but dressed up
> pointers. Should never be there, IMO. (Dmitry)

Indeed. I've participated in the initial Containers Ada Issue. Managed to get indefinite types in, but lost the fight against the C++STL copy-over (cf.. my paper in Ada-Europe 2004).

> In my containers I use positive index 1..<size> instead.

As it should be. I've been pondering using your containers for a long time. Only reason I'm still using Ada's is that they come ready to use with the language. I hate configuration management. But now with Alire I expect configuration work be unavoidable, so probably I'll start using your library at last:-) Read your B_Tree stuff recently. Cool stuff. The separation of storage (RAM, disk...) and structure (vector, map...) still not clear cut. Theoretically storage pools could do this, but Ada does not help her self. I tried a design once with generics (instead of storage pools): also too verbose

>
> --
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de

Re: Non-standard functions in GNAT's Ada.Containers packages?

<ffc943e5-8870-43d2-8deb-64c16cec5947n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8758&group=comp.lang.ada#8758

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:e30b:0:b0:4aa:a21f:e2de with SMTP id s11-20020a0ce30b000000b004aaa21fe2demr5074720qvl.75.1663345850226;
Fri, 16 Sep 2022 09:30:50 -0700 (PDT)
X-Received: by 2002:ac8:7dd2:0:b0:35c:d968:c5d5 with SMTP id
c18-20020ac87dd2000000b0035cd968c5d5mr987259qte.245.1663345850087; Fri, 16
Sep 2022 09:30:50 -0700 (PDT)
Path: i2pn2.org!i2pn.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 09:30:49 -0700 (PDT)
In-Reply-To: <23ae89d7-3f28-4f14-80bc-af794762c756n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=149.90.69.202; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY
NNTP-Posting-Host: 149.90.69.202
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net> <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
<tfvn07$1dee$1@gioia.aioe.org> <23ae89d7-3f28-4f14-80bc-af794762c756n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ffc943e5-8870-43d2-8deb-64c16cec5947n@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: amado.alves@gmail.com (Marius Amado-Alves)
Injection-Date: Fri, 16 Sep 2022 16:30:50 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1850
 by: Marius Amado-Alves - Fri, 16 Sep 2022 16:30 UTC

Jere, ehh.p..., thanks a lot, your complete code was very helpful.
For some reason I tried to write for maps as for vectors and it did not pass.
I see now some forms do pass.
Sorry for the entropy.
As you note, still not possible to access the Key with the "of" form.

/*
And the form
for (C : My_Maps.Cursor) of My_Map.Iterate loop
does not pass. Must be "in"
*/

Thanks all.

Re: Non-standard functions in GNAT's Ada.Containers packages?

<aa33dc02-64ce-40a0-9134-6b38d7bef8d3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8760&group=comp.lang.ada#8760

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:1651:b0:344:5d06:7449 with SMTP id y17-20020a05622a165100b003445d067449mr5360155qtj.292.1663348103848;
Fri, 16 Sep 2022 10:08:23 -0700 (PDT)
X-Received: by 2002:a05:620a:1987:b0:6ce:54bf:3fe3 with SMTP id
bm7-20020a05620a198700b006ce54bf3fe3mr4813842qkb.394.1663348103154; Fri, 16
Sep 2022 10:08:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.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 10:08:22 -0700 (PDT)
In-Reply-To: <ffc943e5-8870-43d2-8deb-64c16cec5947n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.241.104.184; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf
NNTP-Posting-Host: 96.241.104.184
References: <tfshro$2umbi$1@dont-email.me> <d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me> <f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net> <6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
<tfvn07$1dee$1@gioia.aioe.org> <23ae89d7-3f28-4f14-80bc-af794762c756n@googlegroups.com>
<ffc943e5-8870-43d2-8deb-64c16cec5947n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aa33dc02-64ce-40a0-9134-6b38d7bef8d3n@googlegroups.com>
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
From: jhb.chat@gmail.com (Jere)
Injection-Date: Fri, 16 Sep 2022 17:08:23 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3363
 by: Jere - Fri, 16 Sep 2022 17:08 UTC

On Friday, September 16, 2022 at 12:30:51 PM UTC-4, amado...@gmail.com wrote:
> Jere, ehh.p..., thanks a lot, your complete code was very helpful.
> For some reason I tried to write for maps as for vectors and it did not pass.
> I see now some forms do pass.
> Sorry for the entropy.
> As you note, still not possible to access the Key with the "of" form.
>
> /*
> And the form
> for (C : My_Maps.Cursor) of My_Map.Iterate loop
> does not pass. Must be "in"
> */
>
> Thanks all.
No problem at all. Yeah, all the standard Ada containers use the "of" form to iterate
over elements and the "in" form to iterate over cursors. Keys are more like cursors
from the perspective of the container, so you would need to use some form of "in"
to get the keys.

for what it is worth, the example I gave is usable for vectors. you have to change
names and use append() instead of insert(), but the rest is pretty similar:

*******************************************
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Containers.Vectors;

procedure Program is
package Vectors is new Ada.Containers.Vectors(Positive,Integer);

Vector : Vectors.Vector;

begin

Vector.Append(10);
Vector.Append(20);
Vector.Append(30);
Vector.Append(40);

for Element of Vector loop
Put_Line(Element'Image);
end loop;
end Program;
**********************************************
Output:
10
20
30
40
*******************************************
IDEONE compiler link: https://ideone.com/3Ic49d#stdout

So it may depend on how your vector code was originally setup.
The above is how I typically loop through a vector, which works
for maps and other Ada containers as well.

Hope that helps!

Re: Non-standard functions in GNAT's Ada.Containers packages?

<tg2gmj$3toq1$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8765&group=comp.lang.ada#8765

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bnl@nowhere.com (Björn Lundin)
Newsgroups: comp.lang.ada
Subject: Re: Non-standard functions in GNAT's Ada.Containers packages?
Date: Fri, 16 Sep 2022 20:53:07 +0200
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <tg2gmj$3toq1$1@dont-email.me>
References: <tfshro$2umbi$1@dont-email.me>
<d2881a83-7670-447d-9653-f8abcb294564n@googlegroups.com>
<tfujbn$38ptt$1@dont-email.me>
<f50c0ae4-2289-4c3b-86ca-7a6bfb60fbedn@googlegroups.com>
<jogt5kF4gf3U1@mid.individual.net>
<6a8a1468-5148-49d7-b342-327f8eaf8097n@googlegroups.com>
<tg1mun$3oa4l$1@dont-email.me>
<a7171ebe-279f-4cc8-9b0d-0db197e42c0bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Sep 2022 18:53:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="6b4ce771fba3c91bea5cb1473b29fd63";
logging-data="4121409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bOAxJlEHbDNcvBNjeNfgx"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:vHnFerV7cwQ1AIrBElZMk9q6q4w=
In-Reply-To: <a7171ebe-279f-4cc8-9b0d-0db197e42c0bn@googlegroups.com>
Content-Language: en-US
 by: Björn Lundin - Fri, 16 Sep 2022 18:53 UTC

On 2022-09-16 17:00, Marius Amado-Alves wrote:
>>>> "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.

well, yes . I thought the for looping stuff was the important part,
since you done want to call Next.

in or of - does it really matter here?

for C in My_Map.Iterate loop
or
for C of My_Map loop
is not that hurtful to my eyes.

for K,V in My_Map.Iterate loop
or
for K,V of My_Map loop

getting Key and Value as a tuple would be nicer of course

Anyway, I forgot to instantiate the map. Here's a compileable variant

It outputs
Key = AA, Value = 1
Key = AB, Value = 5

----------------

with Ada.Containers.Hashed_Maps;
with Ada.Strings.Hash;
use Ada.Containers;
with Text_Io ; use Text_IO;

procedure Ite is

subtype Test_Type is String(1..2);

package Test_Map_Pkg is new Ada.Containers.Hashed_Maps
(Test_Type,
Integer,
Ada.Strings.Hash,
"=",
"=");

My_Map : Test_Map_Pkg.Map;
use Test_Map_Pkg;
begin
My_Map.Insert("AA",1);
My_Map.Insert("AB",5);

for C in My_Map.Iterate loop
Put_Line ("Key = " & Key (C) & ", Value = " & Element (C)'Img);
end loop;

end Ite;

--
/Björn


devel / comp.lang.ada / Re: Non-standard functions in GNAT's Ada.Containers packages?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor