comp.lang.ada
 help / color / mirror / Atom feed
* What I do wrong here?
@ 2023-09-22  6:25 reinert
  2023-09-22 16:26 ` AdaMagica
  0 siblings, 1 reply; 2+ messages in thread
From: reinert @ 2023-09-22  6:25 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What I do wrong here?
  2023-09-22  6:25 What I do wrong here? reinert
@ 2023-09-22 16:26 ` AdaMagica
  0 siblings, 0 replies; 2+ messages in thread
From: AdaMagica @ 2023-09-22 16:26 UTC (permalink / raw)


Look like a compiler error. Note that @ is brand new, and your left-hand side is quite complicated..

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-22 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22  6:25 What I do wrong here? reinert
2023-09-22 16:26 ` AdaMagica

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