comp.lang.ada
 help / color / mirror / Atom feed
* GNAT error messages, strange generic construction
@ 1995-04-06  0:00 Anders H Johansson
  1995-04-07  0:00 ` Robert Dewar
  1995-04-07  0:00 ` Jan Kok
  0 siblings, 2 replies; 3+ messages in thread
From: Anders H Johansson @ 1995-04-06  0:00 UTC (permalink / raw)


Hi!

I'm compiling my Ada code with the GNAT 2.04 compiler. I've got
two questions:

1. I have got a compiler one-liner error message that I don't
   understand. If I want further information about this error,
   where can I get it? The message, if anyone's interested:
   "controlling argument is not dynamically tagged".

2. What's the point of this generic package construction (mentioned 
   e.g. in J.G.P Barnes "Programming in Ada", p. 447-448):

   with Generic_Elementary_Functions;
   with Generic_Complex_Numbers;
   generic
     with package Elementary_Functions is
       new Generic_Elementary_Functions(<>);
     with package Complex_Numbers is
       new Generic_Complex_Numbers(Elementary_Functions.Float_Type);
   package xxx is
   .
   .
I think it would be more reasonable to transform the generic package parameter
Complex_Numbers into an ordinary instantiation, placed inside the package
xxx. Since it is already decided how it will be instantiated, the genericity
fills no function?!

package xxx is
   package Complex_Numbers is
      new Generic_Complex_Numbers(Elementary_Functions.Float_Type);

---------
Tomas Lindh
erelih@ereyc.ext.ericsson.se





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

end of thread, other threads:[~1995-04-07  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-04-06  0:00 GNAT error messages, strange generic construction Anders H Johansson
1995-04-07  0:00 ` Robert Dewar
1995-04-07  0:00 ` Jan Kok

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