comp.lang.ada
 help / color / mirror / Atom feed
From: reinert <reinkor@gmail.com>
Subject: What I do wrong here?
Date: Thu, 21 Sep 2023 23:25:39 -0700 (PDT)	[thread overview]
Message-ID: <837cb29b-77c2-4410-bbbb-05c38051aa6fn@googlegroups.com> (raw)

-- Assume the following ordered_map:

     package n_cells1_p is new ada.containers.ordered_maps
           (key_type => celltype1_t, element_type => Natural);
      use n_cells1_p;
      n_cells1 : n_cells1_p.map;

 -- This statemanet is OK according to latest gnat (latest alire release):
        n_cells1(cells1(e.id).type1) := n_cells1(cells1(e.id).type1) + 1;

-- But the compiler does not like this:
        n_cells1(cells1(e.id).type1) := @ + 1;

(giving messages: 
error: expected type universal integer 
error: found private type "Ada.Containers.Ordered_Maps.Reference_Type" ...

OK, I can live with the first alternative, but I would like to know...

reinert

             reply	other threads:[~2023-09-22  6:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22  6:25 reinert [this message]
2023-09-22 16:26 ` What I do wrong here? AdaMagica
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox