From: compguy45@gmail.com
Subject: Re: confusion about message passing between the tasks
Date: Sat, 25 Oct 2014 16:26:42 -0700 (PDT)
Date: 2014-10-25T16:26:42-07:00 [thread overview]
Message-ID: <8578e593-1a64-4d0f-9033-f20eef90c731@googlegroups.com> (raw)
In-Reply-To: <wcc8uk3kcuy.fsf@shell01.TheWorld.com>
Can anyone tell me why i am getting zero printed to the screen even though i am passing 5?
2 use Ada.Text_IO, Ada.Integer_Text_IO;
3
4 with Ada.Calendar; use Ada.Calendar;
5
6 procedure strib1 is
7
8 task type Counter_Task is
9 entry Get (Value : out Integer);
10 end Counter_Task;
11
12
13 p: Counter_Task;
14 i : Integer;
15
16
17
18 task body Counter_Task is
19 V : Integer := 0;
20 begin
21 loop
22 select
23 accept Get (Value : out Integer) do
24 put("Value of parametar passed in is ");put(Value);
--Why am i getting zero printed???
25 Value := V;
26 V := V + 1;
27 end Get;
28 or
29 terminate;
30 end select;
31 end loop;
32 end Counter_Task;
33
34 begin
35 i := 5;
36 p.Get(i);
37
next prev parent reply other threads:[~2014-10-25 23:26 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 16:44 confusion about message passing between the tasks compguy45
2014-10-24 18:39 ` Ludovic Brenta
2014-10-25 1:51 ` compguy45
2014-10-25 7:13 ` Ludovic Brenta
2014-10-24 23:49 ` Stribor40
2014-10-25 7:03 ` Ludovic Brenta
2014-10-25 7:58 ` Simon Wright
2014-10-25 13:01 ` compguy45
2014-10-25 14:11 ` Simon Wright
2014-10-25 17:25 ` Dennis Lee Bieber
2014-10-25 17:54 ` Jeffrey Carter
2014-10-25 22:23 ` Robert A Duff
2014-10-25 23:26 ` compguy45 [this message]
2014-10-26 4:50 ` Dennis Lee Bieber
2014-10-26 10:20 ` Georg Bauhaus
2014-10-26 5:37 ` J-P. Rosen
2014-10-26 8:14 ` Pascal Obry
2014-10-26 15:47 ` J-P. Rosen
2014-10-26 20:27 ` Robert A Duff
2014-10-26 20:31 ` Robert A Duff
2014-10-26 20:36 ` Jeffrey Carter
2014-10-26 22:27 ` Robert A Duff
2014-10-26 23:23 ` Jeffrey Carter
2014-10-27 0:46 ` Robert A Duff
2014-10-27 2:18 ` Jeffrey Carter
2014-10-27 7:51 ` J-P. Rosen
2014-10-27 7:44 ` J-P. Rosen
2014-10-26 20:42 ` Dmitry A. Kazakov
2014-10-26 21:15 ` Brad Moore
2014-10-27 9:22 ` Dmitry A. Kazakov
2014-10-26 22:20 ` Robert A Duff
2014-10-27 7:40 ` J-P. Rosen
2014-10-25 23:42 ` compguy45
2014-10-25 23:55 ` compguy45
2014-10-26 0:24 ` Jeffrey Carter
2014-10-26 0:41 ` compguy45
2014-10-26 11:30 ` Brian Drummond
2014-10-26 15:40 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox