From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: making a son benefit access ton an instanciation of a generic package required as a formal parameter to his father and instanciated by him
Date: Sun, 21 Jan 2018 23:20:53 +0100
Date: 2018-01-21T23:20:53+01:00 [thread overview]
Message-ID: <p433o6$b2k$1@dont-email.me> (raw)
In-Reply-To: <297e4450-9934-40b8-9b55-1b16b3e421e4@googlegroups.com>
On 01/21/2018 10:31 PM, Mehdi Saada wrote:
> the exception handler "when P1.Zero_Denominateur => sth;" raises:
Note that you write P1.Zero_Denominateur, not P1_G.Zero_Denominateur. The
exception is declared in the instance, not in the generic.
> P2_G.Child.adb:66:25: exception "Zero_Denominator" is declared in generic formal package
> P2_G.Child.adb:66:25: and therefore cannot appear in handler (RM 11.2(8))
P1 is a generic formal package.
> generic
> with package P1 is new P1_G(<>); -- IN THERE
Right, in P1, which is an instance of P1_G.
A generic package is not a package; it's a mechanism for creating packages,
called instances. A generic package doesn't declare anything; it states what
instances will declare.
--
Jeff Carter
"Saving keystrokes is the job of the text editor,
not the programming language."
Preben Randhol
64
next prev parent reply other threads:[~2018-01-21 22:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-21 15:43 making a son benefit access ton an instanciation of a generic package required as a formal parameter to his father and instanciated by him Mehdi Saada
2018-01-21 15:58 ` Simon Wright
2018-01-21 17:30 ` Mehdi Saada
2018-01-21 17:39 ` Simon Wright
2018-01-21 17:50 ` Dmitry A. Kazakov
2018-01-21 20:15 ` Mehdi Saada
2018-01-21 20:41 ` Dmitry A. Kazakov
2018-01-21 21:29 ` Mehdi Saada
2018-01-21 21:31 ` Mehdi Saada
2018-01-21 22:20 ` Jeffrey R. Carter [this message]
2018-01-21 23:07 ` Mehdi Saada
2018-01-21 23:10 ` Mehdi Saada
2018-01-22 8:28 ` Dmitry A. Kazakov
2018-01-22 9:25 ` Simon Wright
2018-01-23 1:23 ` Randy Brukardt
2018-01-21 22:04 ` J-P. Rosen
2018-01-22 15:36 ` Mehdi Saada
2018-01-22 15:54 ` Mehdi Saada
2018-01-22 15:52 ` Simon Wright
2018-01-23 1:33 ` Randy Brukardt
2018-01-23 14:05 ` Mehdi Saada
2018-01-23 1:13 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox