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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec4a7355f321a22b X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Task discriminants Date: Thu, 20 May 2004 19:30:57 +0200 Organization: AdaCL Message-ID: <3191556.otblUWQ27X@linux1.krischik.com> References: <40ACC50E.9040406@mail.usyd.edu.au> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1085117449 02 27852 8iE5GGOr8UOrSZcl 040521 05:30:49 X-Complaints-To: usenet-abuse@t-online.de X-ID: Ek-FEmZ1we3FrNn70gjwmBPocGa4cjVER7cSHYb3ZSJohZ553h3H6c User-Agent: KNode/0.7.7 Xref: controlnews3.google.com comp.lang.ada:729 Date: 2004-05-20T19:30:57+02:00 List-Id: Dave Levy wrote: > 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. Of corse not! Tasks are indefinite type and can't be stored in arrays. You can store an access to a task in an array. With Regards Martin PS: I could not find anything in the RM: Does anybody know if task are also limited. -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com