comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: array for all tasks
Date: Mon, 22 Dec 2003 10:45:13 +0100
Date: 2003-12-22T10:45:13+01:00	[thread overview]
Message-ID: <10833879.SThZFdkLlq@linux1.krischik.com> (raw)
In-Reply-To: 3fe43a4c$1@news.barak.net.il

Ratson Janiv wrote:

> Hi,

> I have a task with 3entries.
> The first entry set an array size:
> accept Start(Array_Size:Natural);
> declare
> 
> Arr_Checks : Arr2(1..Array_Size);
> 
> begin ...
> 
> The other 2 tasks need to use this array.
> how do I implement that, so the other tasks will also know and may use the
> array?

Arr_Checks'Length
Arr_Checks'First
Arr_Checks'Last

But do read about protected object before continuing. As other posters
pointed out protected objects might be better. I certanly would use a
protected object. You might also look at how I have solved a similar
problem:

http://adacl.sourceforge.net/html
______Include__AdaCL-Queue-Protect__adb.htm
http://adacl.sourceforge.net/html/______Include__AdaCL-Queue-Tasked__adb.htm

With Regards

Martin
-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




      parent reply	other threads:[~2003-12-22  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-20 12:00 array for all tasks Ratson Janiv
2003-12-20 14:37 ` Martin Dowie
2003-12-22  9:45 ` Martin Krischik [this message]
replies disabled

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