Task discriminants

From: Dave Levy (dlevy_at_mail.usyd.edu.au)
Date: 05/20/04


Date: Fri, 21 May 2004 00:47:42 +1000

Hi

Suppose one has a task type with a discriminant:

    task type A_Task( Id : integer);

and one wishes to declare a set of tasks with initialised discriminants:
    t1 : A_Task(1);
    t2 : A_Task(2);
    t3 : A_Task(3);

How could one declare them as an array of tasks with each one getting an
initialised discriminant? Perhaps something like:

    The_Tasks: array (1..3) of A_Task( Id => 1,2,3 );

Except I tried this with Gnat and it won't compile.

Thanks

Dave



Relevant Pages

  • Re: Task discriminants
    ... > Suppose one has a task type with a discriminant: ... > and one wishes to declare a set of tasks with initialised discriminants: ... can store an access to a task in an array. ...
    (comp.lang.ada)
  • Re: Task discriminants
    ... "Dave Levy" wrote in message ... > and one wishes to declare a set of tasks with initialised discriminants: ... It is a basic precept of Ada arrays that its components are all of the same ...
    (comp.lang.ada)
  • Re: Task discriminants
    ... > Suppose one has a task type with a discriminant: ... > and one wishes to declare a set of tasks with initialised discriminants: ...
    (comp.lang.ada)