From: "Jeffrey R. Carter" <spam@spam.com>
Subject: Re: Re-exporting primitive operations of a private type (like "-", and 'min)
Date: Mon, 31 Oct 2005 06:14:38 GMT
Date: 2005-10-31T06:14:38+00:00 [thread overview]
Message-ID: <iDi9f.3949$yX2.741@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: <slrndmbdiv.4s0.bogus_addy@tango.mindfuq.org>
Anonymous Coward wrote:
> function Subtract (Left, Right : in Private_Distance_Type)
> return Private_Distance_Type is
>
> begin
>
> --Kazakov's suggested approach. This is good because it's
> --simple, and doesn't require type conversions.
> --(May not work with gnat 3.15p)
>
> return (Left - Right);
>
> end Subtract;
This isn't going to work. Subtract has to be defined for the private type's
parent (as a renaming of "-"), so the private type also has Subtract defined.
Then you can define "-" for the private type as a renaming of Subtract.
Here, "-" refers to the explicitly defined operation, which is a renaming of
Subtract, so this is infinite recursion.
--
Jeff Carter
"There's no messiah here. There's a mess all right, but no messiah."
Monty Python's Life of Brian
84
next prev parent reply other threads:[~2005-10-31 6:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-29 21:19 Re-exporting primitive operations of a private type (like "-", and 'min) Anonymous Coward
2005-10-30 8:57 ` Dmitry A. Kazakov
2005-10-30 9:18 ` Jeffrey R. Carter
2005-10-30 14:16 ` Martin Krischik
2005-10-30 22:35 ` Robert A Duff
2005-10-31 4:15 ` Anonymous Coward
2005-10-31 4:34 ` Anonymous Coward
2005-10-31 6:14 ` Jeffrey R. Carter [this message]
2005-11-01 3:39 ` Anonymous Coward
2005-11-01 4:47 ` Jeffrey R. Carter
2005-11-01 23:43 ` Anonymous Coward
2005-11-02 3:35 ` Jeffrey R. Carter
2005-11-01 14:11 ` Robert A Duff
2005-10-31 8:27 ` Niklas Holsti
2005-10-31 9:18 ` Dmitry A. Kazakov
2005-11-02 9:50 ` Jean-Pierre Rosen
2005-11-03 9:15 ` Niklas Holsti
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox