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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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!news.cs.univ-paris8.fr!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: Task discriminants Date: Thu, 20 May 2004 12:17:32 -0500 Organization: Cuivre, Argent, Or Message-ID: References: <40ACC50E.9040406@mail.usyd.edu.au> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1085073466 85591 212.85.156.195 (20 May 2004 17:17:46 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 20 May 2004 17:17:46 +0000 (UTC) Cc: "comp.lang.ada@ada.eu.org" To: "Dave Levy" Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: controlnews3.google.com comp.lang.ada:708 Date: 2004-05-20T12:17:32-05:00 How about: The_Tasks: array (1 .. 3) of A_Task = (A_Task (1), A_Task (2), A_Task (3) ); ----- Original Message ----- From: "Dave Levy" Newsgroups: comp.lang.ada To: Sent: Thursday, May 20, 2004 9:47 AM Subject: Task discriminants > 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 > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada-france.org > http://www.ada-france.org/mailman/listinfo/comp.lang.ada >