From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Newbie: Task parametering
Date: Mon, 17 Oct 2005 12:02:43 +0200
Date: 2005-10-17T12:02:43+02:00 [thread overview]
Message-ID: <m2zmp8h35o.fsf@hugin.crs4.it> (raw)
In-Reply-To: 43532f82$0$28244$5a62ac22@per-qv1-newsreader-01.iinet.net.au
Andrew Price wrote:
>> Andrew Price wrote:
>>> type Task_Handle is access A_Task; -- used to point to the task
>>> Another_Task : Task_Handle;
>>> type Data_Handle is access Task_Data; -- used to point to its data
>>> Data_For_Task : Data_Handle;
>>>
>>>begin -- The main prog will now spawn three of the above tasks
>>>
>>> -- Parameterise the first task and then start it.
>>> Data_For_Task := new Task_Data;
>>> Data_For_Task.Name := "Task A ";
>>> Data_For_Task.Period := 0.5;
>>> Data_For_Task.Repetitions := 5;
>>> Another_Task := new A_Task(Data_For_Task);
> I thought that the task would not start running until the statement
>
> Another_Task := new A_Task(Data_For_Task);
>
> which occurs after the values in the Data_For_Task record have been
> set?
That is also my understanding.
> I originally wanted to just use multiple discriminants to initialise
> the task however I ran into compilation errors because
> "discriminants must have a discrete or access type" and I wanted to
> include a string among the initialising variables.
You would have to pass an access value to a string (constant) instead
of a string. Or maybe an access to your Task_Data type.
Greetings,
Jacob
--
�I'm perfectly happy with my current delusional system.�
-- Mirabel Tanner
next prev parent reply other threads:[~2005-10-17 10:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 0:23 Newbie: Task parametering Andrew Price
2005-10-17 0:53 ` jimmaureenrogers
2005-10-17 2:37 ` tmoran
2005-10-17 4:10 ` tmoran
2005-10-17 4:58 ` Andrew Price
2005-10-17 10:02 ` Jacob Sparre Andersen [this message]
2005-10-17 15:57 ` Poul-Erik Andreasen
2005-10-17 22:51 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox