comp.lang.ada
 help / color / mirror / Atom feed
* Task Discriminants & Arrays
@ 1997-05-13  0:00 Matthew Heaney
  1997-05-13  0:00 ` Jeff Carter
  1997-05-13  0:00 ` Robert A Duff
  0 siblings, 2 replies; 15+ messages in thread
From: Matthew Heaney @ 1997-05-13  0:00 UTC (permalink / raw)




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
<mailto:matthew_heaney@acm.org>
(818) 985-1271




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1997-05-16  0:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-13  0:00 Task Discriminants & Arrays Matthew Heaney
1997-05-13  0:00 ` Jeff Carter
1997-05-13  0:00   ` Matthew Heaney
1997-05-13  0:00   ` John G. Volan
1997-05-14  0:00     ` Jeff Carter
1997-05-13  0:00 ` Robert A Duff
1997-05-14  0:00   ` W. Wesley Groleau (Wes)
1997-05-15  0:00     ` Mats Weber
1997-05-15  0:00     ` Robert A Duff
1997-05-15  0:00       ` John G. Volan
1997-05-15  0:00         ` Robert A Duff
1997-05-16  0:00           ` John G. Volan
1997-05-16  0:00             ` John G. Volan
1997-05-15  0:00         ` Matthew Heaney
1997-05-15  0:00           ` John G. Volan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox