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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,321833745abc5bf3 X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Tasks with discriminants Date: 1997/12/02 Message-ID: <3483F43C.276491E0@elca-matrix.ch>#1/1 X-Deja-AN: 294488565 References: <3483C38C.1FF2@home.com> Organization: ELCA Matrix SA Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1997-12-02T00:00:00+00:00 List-Id: Larry Coon wrote: > task type t (task_no: integer); > But if I want to declare an array of tasks, I > can't figure out how to supply values for the > discriminants: > > type task_array is array (1..3) of t; > my_tasks: task_array; -- ???? > > Can anybody tell me how the discriminants are > supplied in this case? Thanks in advance. You can't do this in a way that My_Tasks(i).task_no = i for all i in My_Tasks'Range. But you can make sure all tasks are initialized with a distinct value of task_no, and that is described in the Ada 95 Rationale: .