comp.lang.ada
 help / color / mirror / Atom feed
From: agate!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at !mcsun!julienas!newsserver!geant!courtel@ucbvax.Berkeley.EDU  (Nicolas Courtel)
Subject: Re: Compiling Packages and generic Subprograms
Date: 26 Feb 93 08:48:12 GMT	[thread overview]
Message-ID: <1993Feb26.084812.6918@cenatls.cena.dgac.fr> (raw)

>>>>> On Thu, 25 Feb 1993 11:42:32 GMT, otte@antpc.ant.uni-hannover.de (Herr Ot
te) said:

Dirk> What is wrong with my package Pac ?

Dirk> package Pac is
Dirk>    generic
Dirk>       type Fixed is delta <> ;
Dirk>    procedure Get_Fixed ( Fixed_Wert : out Fixed ) ;
Dirk>    procedure Get_Dur is new Get_Fixed ( DURATION ) ;
Dirk> end Pac ;
[Package body deleted]

Dirk> Is something wrong in my source code ?
Dirk> Perhaps, is it forbidden, to instantiate a generic unit, before the body
Dirk> of this unit is compiled ?

That's right: LRM says 'For the instantiation of a generic unit that has a body
,
a check is made that this body is already elaborated. The exception
PROGRAM_ERROR is raised if any of these checks fails' (3.9, 7 & 8)

Dirk> Or is this a problem of my compiler ?

Its error messages are somewhat obscure in that case, but your compiler is
probably OK.

--
Nicolas Courtel - courtel@dgac.fr

>>>    Any system which depends on human reliability is unreliable    <<<

             reply	other threads:[~1993-02-26  8:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-02-26  8:48 agate!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-02-26  7:47 Compiling Packages and generic Subprograms agate!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at
1993-02-26  1:43 Dave Bashford
replies disabled

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