From: tmoran@bix.com
Subject: Re: Subverting 'Access for Sub-programs
Date: 1999/08/03
Date: 1999-08-03T00:00:00+00:00 [thread overview]
Message-ID: <T1Gp3.13367$U5.628154@typhoon-sf.snfc21.pbi.net> (raw)
In-Reply-To: 37A71EF1.2201@dera.gov.uk
Remember that Database.Perform is completely within its rights to
save away the Action parameter and call Action later. It might
save it in a variable, or, more subtly, hand it to a task which
will use it after Action no longer exists. A jump into random
junk is not a very nice way for a program to crash.
To avoid the problem, how about:
package Dont_Disappear is
procedure Print_If_Even( I : in Integer );
end Dont_Disappear;
with Text_IO;
package body Dont_Disappear is
procedure Print_If_Even( I : in Integer ) is
begin
if I rem 2 = 0 then
Text_IO.Put_Line( Integer'Image( I ) );
end if;
end Print_If_Even;
end Dont_Disappear;
with Database,
Dont_Disappear;
procedure Main is
begin
Database.Perform( Action => Dont_Disappear.Print_If_Even'Access );
end Main;
next prev parent reply other threads:[~1999-08-03 0:00 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-03 0:00 Subverting 'Access for Sub-programs Anton Gibbs
1999-08-03 0:00 ` Steve Doiel
1999-08-03 0:00 ` tmoran [this message]
1999-08-03 0:00 ` Ted Dennison
1999-08-03 0:00 ` David C. Hoos, Sr.
1999-08-05 0:00 ` Robert A Duff
1999-08-03 0:00 ` Brian Rogoff
1999-08-03 0:00 ` Michael F. Yoder
1999-08-04 0:00 ` Robert Dewar
1999-08-04 0:00 ` Robert A Duff
1999-08-04 0:00 ` Robert Dewar
1999-08-04 0:00 ` Anton Gibbs
1999-08-04 0:00 ` Jean-Pierre Rosen
1999-08-04 0:00 ` Brian Rogoff
1999-08-05 0:00 ` Jean-Pierre Rosen
1999-08-05 0:00 ` adam
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` What is a Display ? (was: Subverting 'Access for Sub-programs) Larry Kilgallen
1999-08-05 0:00 ` Hyman Rosen
1999-08-06 0:00 ` Robert Dewar
1999-08-06 0:00 ` Robert Dewar
1999-08-05 0:00 ` Subverting 'Access for Sub-programs adam
1999-08-06 0:00 ` Robert A Duff
1999-08-06 0:00 ` adam
1999-08-09 0:00 ` Robert A Duff
1999-08-09 0:00 ` Mark Biggar
1999-08-05 0:00 ` Robert A Duff
1999-08-05 0:00 ` Brian Rogoff
1999-08-06 0:00 ` Robert Dewar
1999-08-09 0:00 ` Tucker Taft
1999-08-10 0:00 ` Robert Dewar
1999-08-11 0:00 ` Dmitry A. Kazakov
1999-08-11 0:00 ` Robert Dewar
1999-08-12 0:00 ` Dmitry A. Kazakov
1999-08-14 0:00 ` Robert Dewar
1999-08-16 0:00 ` Dmitry A. Kazakov
1999-08-11 0:00 ` Richard D Riehle
1999-08-11 0:00 ` Tucker Taft
1999-08-13 0:00 ` Robert Dewar
1999-08-13 0:00 ` Robert Dewar
1999-08-13 0:00 ` Brian Rogoff
1999-08-11 0:00 ` Robert A Duff
1999-08-11 0:00 ` Robert Dewar
1999-08-05 0:00 ` tmoran
1999-08-06 0:00 ` Robert A Duff
1999-08-05 0:00 ` Robert Dewar
1999-08-06 0:00 ` Brian Rogoff
1999-08-07 0:00 ` Gautier
1999-08-05 0:00 ` Robert A Duff
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` Brian Rogoff
1999-08-04 0:00 ` Robert A Duff
1999-08-04 0:00 ` Brian Rogoff
1999-08-05 0:00 ` tmoran
1999-08-05 0:00 ` Robert Dewar
1999-08-05 0:00 ` Ray Blaak
1999-08-06 0:00 ` Jean-Pierre Rosen
1999-08-06 0:00 ` Hyman Rosen
1999-08-07 0:00 ` Florian Weimer
1999-08-06 0:00 ` Robert Dewar
1999-08-06 0:00 ` Robert A Duff
1999-08-08 0:00 ` Brian Rogoff
1999-08-09 0:00 ` Robert A Duff
1999-08-10 0:00 ` Brian Rogoff
1999-08-09 0:00 ` Tucker Taft
1999-08-05 0:00 ` Aidan Skinner
1999-08-05 0:00 ` Anton Gibbs
1999-08-05 0:00 ` Steve Quinlan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox