From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Definition of "aliased"
Date: 1998/10/28
Date: 1998-10-28T00:00:00+00:00 [thread overview]
Message-ID: <EACHUS.98Oct28151641@spectre.mitre.org> (raw)
In-Reply-To: 714ll9$ft8$1@nnrp1.dejanews.com
In article <714ll9$ft8$1@nnrp1.dejanews.com> dennison@telepath.com writes:
> Cool! I don't suppose that trick works for tasks as well? Being able to
> display Task_Type'Storage_Size would sure be handy inside of a Storage_Error
> exception handler...
Should work fine, inside a task the name denotes the current
instance, see RM 8.6(17) and RM 9.1(19). If you need to name a type
itself inside its definition you have to create a subtype outside.
(Note: Running a program containing the following task type may be
hazardous to your computer's health.)
task type Rabbit is end Rabbit;
subtype Bunny is Rabbit;
task body Rabbit is
Child1, Child2: Bunny;
begin delay 1.0; end Rabbit;
Don't let this example convince you that you never want to use this
feature. A much saner use is to create a backup task that doesn't
start running (and create its own backup) until the task that created
it dies.
--
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
prev parent reply other threads:[~1998-10-28 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-26 0:00 Definition of "aliased" Matthew Heaney
1998-10-26 0:00 ` Tucker Taft
1998-10-26 0:00 ` dennison
1998-10-26 0:00 ` Matthew Heaney
1998-10-27 0:00 ` dennison
1998-10-28 0:00 ` Robert I. Eachus [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox