comp.lang.ada
 help / color / mirror / Atom feed
From: Marius Amado-Alves <amado.alves@gmail.com>
Subject: Re: Vector (container) initialization: the schizophrenic ampersand
Date: Thu, 17 May 2012 23:51:52 -0700 (PDT)
Date: 2012-05-17T23:51:52-07:00	[thread overview]
Message-ID: <28845c63-b06c-4ac2-b5d5-e408c0ff4b7f@googlegroups.com> (raw)
In-Reply-To: <70510fa1-e554-44a7-9364-e745674c1bda@googlegroups.com>

Adam is right: it is confusion with the predefined "&" for arrays, when the elements are arrays. (But the compiler error messages indicate undecision only between the two Vectors "&" functions.) So my new solution is

function "+" (L : My_Vectors.Vector; R : My_Element_Type) 
   renames My_Vectors."&"; 

function "+" (L, R : My_Element_Type) 
   renames My_Vectors."&"; 

V : My_Vectors.Vector := Element1 + Element2 + Element3;

A bit less inelegant.

/* But more than parenthesis or T'(...) in my view. */

Thanks a lot. This group is outstanding.



  parent reply	other threads:[~2012-05-18  6:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 20:20 Vector (container) initialization: the schizophrenic ampersand Marius Amado-Alves
2012-05-17 20:24 ` Jeffrey Carter
2012-05-17 20:26 ` Pascal Obry
2012-05-17 23:33 ` Adam Beneschan
2012-05-18  6:34   ` Marius Amado-Alves
2012-05-18  6:51   ` Marius Amado-Alves [this message]
2012-05-18 13:31     ` Robert A Duff
2012-05-18 18:55       ` Shark8
2012-05-18 22:44         ` Robert A Duff
2012-05-19  9:03       ` Marius Amado-Alves
2012-05-19 16:15         ` Robert A Duff
2012-05-21 16:02           ` Adam Beneschan
2012-05-21 17:04             ` Robert A Duff
2012-05-21 17:57               ` Adam Beneschan
2012-05-21 15:57         ` Adam Beneschan
2012-05-19  9:28     ` Dmitry A. Kazakov
replies disabled

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