From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fe3c0be7cdbdeea3 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Definition of "aliased" Date: 1998/10/28 Message-ID: #1/1 X-Deja-AN: 406045541 References: <7127j9$h36$1@nnrp1.dejanews.com> <714ll9$ft8$1@nnrp1.dejanews.com> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1998-10-28T00:00:00+00:00 List-Id: 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...