comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Arrays with discriminated task components
Date: Sat, 24 Dec 2022 23:41:34 +0100	[thread overview]
Message-ID: <to7v6v$2cjc4$1@dont-email.me> (raw)
In-Reply-To: <k0otavF33okU1@mid.individual.net>

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.

-- 
Jeff Carter
"My mind is aglow with whirling, transient nodes of
thought, careening through a cosmic vapor of invention."
Blazing Saddles
85

  reply	other threads:[~2022-12-24 22:41 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 [this message]
2022-12-25 15:32     ` Niklas Holsti
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