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,5b824cbe41153d3a X-Google-Attributes: gid103376,public From: Gerald Kasner Subject: Re: Extending tagged type with a task Date: 2000/11/16 Message-ID: <3A13A017.EF04BD44@Physik.Uni-Magdeburg.de>#1/1 X-Deja-AN: 694246450 Content-Transfer-Encoding: 7bit References: <3A138EA3.9DD2CD9B@CCI.de> X-Original-NNTP-Posting-Host: kasner.nat.uni-magdeburg.de X-Accept-Language: en, de-DE Content-Type: text/plain; charset=us-ascii X-Trace: 16 Nov 2000 09:51:39 +0100, loriot.cs.uni-magdeburg.de Organization: Otto-von-Guericke-Universitaet Magdeburg MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-11-16T00:00:00+00:00 List-Id: Vincent Smeets schrieb: > > Hello, > > How can I extend a non-limited tagged type with an object of a task > type? I can't change the type A.T to a limited type but B.T may be > limited. > > Thanks > > --:::::::::::::: > --a.ads > --:::::::::::::: > package A is > > type T is tagged null record; > > end A; > --:::::::::::::: > --b.ads > --:::::::::::::: > with A; > package B is > > task type B_Task_T; > > type T is new A.T with > record > B_Task : B_Task_T; > end record; > > end B; > > -- Vincent Smeets Competence Center Informatik GmbH > -- Tel. : +49-5931-805461 Postfach 1225 > -- Fax : +49-5931-805175 49702 Meppen, Germany > -- EMail: Vincent.Smeets@CCI.de http://www.CCI.de/ > -- PGP fingerprint: 53 1C 3B 6F B6 9A EB 83 B4 7E 25 08 78 BD 5C 2C I would use a pointer to the task: with A; package B is task type B_Task_T; type b_task_ptr is access B_Task_T; type T is new A.T with record B_Task : B_Task_ptr; end record; end B; Gerald