comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Arrays with discriminated task components
Date: Sun, 25 Dec 2022 17:32:43 +0200	[thread overview]
Message-ID: <k0r8orFdlkfU1@mid.individual.net> (raw)
In-Reply-To: <to7v6v$2cjc4$1@dont-email.me>

On 2022-12-25 0:41, Jeffrey R.Carter wrote:
> On 2022-12-24 19:05, Niklas Holsti wrote:
>> On 2022-12-24 13:44, AdaMagica wrote:
>>>
>>> Now I want an array of these tasks, where each task knows its 
>>> identity (the index) via the discriminant, an
>>> iterated_component_association: >
>>> Arr: array (Index) of T := (for I in Index => ???);
>>
>> One way is to give the discrimant a default value that is a function 
>> call that returns a new identifier on each call:
> 
> No, this does not guarantee that the task's discriminant is its index in 
> the array, which is a requirement of the question.


Right, I did not take that requirement into account, apologies for my 
inattention. Indeed the tasks in the array are initialized in an 
arbitrary order, not necessarily in increasing index order.

  reply	other threads:[~2022-12-25 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24 11:44 Arrays with discriminated task components AdaMagica
2022-12-24 18:05 ` Niklas Holsti
2022-12-24 22:41   ` Jeffrey R.Carter
2022-12-25 15:32     ` Niklas Holsti [this message]
2022-12-25 16:16 ` Niklas Holsti
2022-12-26 16:39   ` AdaMagica
replies disabled

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