From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: Return by reference
Date: 1999/11/03
Date: 1999-11-03T00:00:00+00:00 [thread overview]
Message-ID: <38203d4a_1@news1.prserv.net> (raw)
In-Reply-To: Pine.BSF.4.10.9911021905050.1386-100000@shell5.ba.best.com
In article <Pine.BSF.4.10.9911021905050.1386-100000@shell5.ba.best.com>
, Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> I was going to use the "Rosen trick" to modify data in the Fmt each time
> "&" is called. Unfortunately, that requires making the full view of
> Format_Type limited and you run into the problem I described.
>
> Is there a cleaner way to implement that interface?
1) Privately implement the type as tagged, to make it a by-reference
type.
2) This allows you to invoke RM95 13.3 (16), to take the address of
parameter.
3) Pass the address to an instantiation of
System.Address_To_Access_Conversions, which gives you a variable view of
the parameter.
Note that there has been a subtle error running throughout this thread.
There is nothing wrong with returning a "by-reference" type as a
function return type; the error is returning a *limited* type.
--
Science is, foremost, a method of interrogating reality: proposing
hypotheses that seem true and then testing them -- trying, almost
perversely, to negate them, elevating only the handful that survive to
the status of a theory. Creationism is a doctrine, whose adherents are
interested only in seeking out data that support it.
George Johnson, NY Times, 15 Aug 1999
next prev parent reply other threads:[~1999-11-03 0:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-01 0:00 Return by reference Brian Rogoff
1999-11-02 0:00 ` Lutz Donnerhacke
1999-11-02 0:00 ` Robert A Duff
1999-11-02 0:00 ` Brian Rogoff
1999-11-03 0:00 ` Lutz Donnerhacke
1999-11-03 0:00 ` Brian Rogoff
1999-11-04 0:00 ` Lutz Donnerhacke
1999-11-06 0:00 ` Brian Rogoff
1999-11-07 0:00 ` Lutz Donnerhacke
1999-11-04 0:00 ` Robert A Duff
1999-11-03 0:00 ` Matthew Heaney [this message]
1999-11-03 0:00 ` Matthew Heaney
1999-11-03 0:00 ` Brian Rogoff
-- strict thread matches above, loose matches on Subject: below --
2017-12-17 14:38 Jere
2017-12-17 14:57 ` Dmitry A. Kazakov
2017-12-18 0:51 ` Mehdi Saada
2017-12-18 8:18 ` Dmitry A. Kazakov
2017-12-18 10:47 ` Mehdi Saada
2017-12-18 12:16 ` Dmitry A. Kazakov
2017-12-18 22:41 ` Randy Brukardt
2017-12-18 22:33 ` Randy Brukardt
2017-12-19 1:29 ` Jere
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox