From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.49.198 with SMTP id w6mr1855391obn.20.1413252851775; Mon, 13 Oct 2014 19:14:11 -0700 (PDT) X-Received: by 10.50.30.37 with SMTP id p5mr45958igh.8.1413252851691; Mon, 13 Oct 2014 19:14:11 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!uq10no10237739igb.0!news-out.google.com!rp1ni27119igb.0!nntp.google.com!uq10no10237737igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 13 Oct 2014 19:14:10 -0700 (PDT) In-Reply-To: <55ca779f-022c-4712-84df-55672e5ccb1e@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <41154c4b-6158-4701-ab25-85afa3b24ed2@googlegroups.com> <55ca779f-022c-4712-84df-55672e5ccb1e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3802f993-6614-4a64-93c9-6072bc72959b@googlegroups.com> Subject: Re: passing messages between the tasks From: Adam Beneschan Injection-Date: Tue, 14 Oct 2014 02:14:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2438 X-Received-Body-CRC: 3345627530 Xref: news.eternal-september.org comp.lang.ada:22443 Date: 2014-10-13T19:14:10-07:00 List-Id: On Monday, October 13, 2014 7:09:42 PM UTC-7, comp...@gmail.com wrote: > What I mean for example..... >=20 >=20 >=20 > task t body is >=20 > begin >=20 > some statements; >=20 > accept reset do >=20 > i : Integer :=3D some calculation >=20 > b : Inetegr :=3D some calculation >=20 > end reset;=20 >=20 > end t; >=20 >=20 >=20 > If I have array of these tasks some tasks might have different i and b. H= ow do i save thse values one tasks completes accept block? If "I" and "B" are declared outside the ACCEPT statement, such as between t= he "task body" and the "begin", then when the ACCEPT statement is done, the= variables will still have the values you assigned to them. Since they're = declared in the task body, each task will have its own versions of these va= riables.=20 task body t is i : integer; b : boolean; begin ... accept reset do i :=3D something; b :=3D something; end reset; ... now you can use i and b end t; Is that all you need? -- Adam