From: "Maksymilian Boguń" <mbogun@gmail.com>
Subject: Array not updated in procedure in protected type
Date: Fri, 22 Jan 2010 08:26:51 -0800 (PST)
Date: 2010-01-22T08:26:51-08:00 [thread overview]
Message-ID: <3e834b40-609f-47a1-87bc-1b653098b140@a6g2000yqm.googlegroups.com> (raw)
Hi!
I created a protected object with a private array of records. When I
want to update the elements of this array, I use a procedure in this
protected object. The important part is:
My_Bird := Birds(Bird_I);
if not My_Bird.Alive then
return;
end if;
My_Bird.Alive := False;
Birds(Bird_I) := My_Bird;
When running with debugger, I can see, that Birds(Bird_I).Alive is
False after this code is executed. However, when I switch to another
task and call this procedure again Birds(Bird_I).Alive is still True.
The array is not modified anywhere else, only through this protected
object. What is wrong, why doesn't it work?
Cheers,
-- Max
next reply other threads:[~2010-01-22 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 16:26 Maksymilian Boguń [this message]
2010-01-22 16:51 ` Array not updated in procedure in protected type xavier grave
2010-01-23 16:37 ` Maksymilian Boguń
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox