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,b4731a3b5d591abd,start X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Task Discriminants & Arrays Date: 1997/05/13 Message-ID: #1/1 X-Deja-AN: 241254701 Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-05-13T00:00:00+00:00 List-Id: One of the nice things about Ada 95 is that I can pass a task an identifier by giving the task a discriminant: task type T (Id : Positive) is entry E; end T; O : T (1); And then the task knows its own identifier by refering to Id. Now suppose I have a task array: type Task_Array is array (Positive range <>) of T; -- ??? O : Task_Array; -- ??? It would be really swell if I could give the task object component of the array an identifier that is its index position in the array. Anyone got any ideas about how to do this? Is there some other technique for allowing the elaborator to assign an id to a task object, without using an initialization entry? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271