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,87b35cce6984b960 X-Google-Attributes: gid103376,public From: gauthier@unilim.fr (Michel Gauthier) Subject: Re: Renaming exceptions in private section? Date: 1996/04/22 Message-ID: #1/1 X-Deja-AN: 150762783 references: <4l52fh$ivr@goanna.cs.rmit.edu.au> organization: Universite de Limoges newsgroups: comp.lang.ada Date: 1996-04-22T00:00:00+00:00 List-Id: In article <4l52fh$ivr@goanna.cs.rmit.edu.au>, Dale Stanbrough wrote: >> [...] >> When I tried... >> >> package fred is >> >> a: exception; >> >> private >> b: exception; >> a: exception renames b; >> end; >> >> ....Gnat complained that >> >> "a" conflicts with declaration at line 3 >> >> Is it possible to rename an exception in the private section >> - sort of a deferred exception (similar to deferred constants)? Strictly speaking, no, but a good trick could be to use Exception_Id~entities (see for instance my old paper in Ada Letters). with Ada . Exceptions ; package fred is a: constant Ada . Exceptions . Exception_Id ; ... private b: exception; a: constant Ada . Exceptions . Exception_Id := B ' Identity ; end; ---------- ---------- ---------- ---------- Michel Gauthier / Laboratoire d'informatique 123 avenue Albert Thomas / F-87060 Limoges telephone +33 () 55457335 [or ~ 7232] fax +33 () 55457315 [or ~7201] ---------- ---------- ---------- ---------- La grande equation de la fin du siecle : windows-X = Mac-Y The main end-of-century equation : windows-X = Mac-Y ---------- ---------- ---------- ---------- Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9 If you feel year 2000 a stupid mystic craze, use numeration base 9 ---------- ---------- ---------- ----------