comp.lang.ada
 help / color / mirror / Atom feed
From: m88asjn@mtek.chalmers.se (Anders H Johansson)
Subject: GNAT error messages, strange generic construction
Date: 1995/04/06
Date: 1995-04-06T00:00:00+00:00	[thread overview]
Message-ID: <3m10hi$eu0@nyheter.chalmers.se> (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





             reply	other threads:[~1995-04-06  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-04-06  0:00 Anders H Johansson [this message]
1995-04-07  0:00 ` GNAT error messages, strange generic construction Robert Dewar
1995-04-07  0:00 ` Jan Kok
replies disabled

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