Prev: Initialization and Finalization of limited object "returned" by a function
Next: Gnat Programming Studio (GPS) crashes immediately after start on SuSE 11.2
From: Jean-Pierre Rosen on 11 Feb 2010 06:33 Ludovic Brenta a �crit : > Yannick Duch�ne wrote on comp.lang.ada: >> Tested_Interface : Dispatch.Instance_Class := >> (Dispatch.New_Instance); > > Here you are initializing with an aggregate that contains the result > of the function call. I suspect this triggers a compiler bug. What > happens if you remove the parentheses? No, this is a parenthesized expression. This (would be) syntactic ambiguity is the reason why an aggregate with a single element must use named notation. -- --------------------------------------------------------- J-P. Rosen (rosen(a)adalog.fr) Visit Adalog's web site at http://www.adalog.fr
From: Jean-Pierre Rosen on 12 Feb 2010 11:27
Robert A Duff a �crit : > Aggregates should use "[" and "]", so there's no confusion. > An empty aggregate would be "[ ]", and a singleton > would be "[X]". As far as I know, the only reason > this wasn't done was because of keyboards/character sets > that didn't have those characters. But that's a bogus > reason -- it could be done just like the stuff in J.2. > It shows your age when you think you started programming on a TTY-33... -- --------------------------------------------------------- J-P. Rosen (rosen(a)adalog.fr) Visit Adalog's web site at http://www.adalog.fr |