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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e9caf8720058dd5e,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!c35g2000hsg.googlegroups.com!not-for-mail From: Gerd Newsgroups: comp.lang.ada Subject: embed accept statement in procedures not possible? Date: 4 May 2007 08:04:41 -0700 Organization: http://groups.google.com Message-ID: <1178291081.936739.131740@c35g2000hsg.googlegroups.com> NNTP-Posting-Host: 62.159.113.204 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1178291082 11138 127.0.0.1 (4 May 2007 15:04:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 May 2007 15:04:42 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: c35g2000hsg.googlegroups.com; posting-host=62.159.113.204; posting-account=_FaVAg0AAAAYUPoPAQYNRFF35JBHf9i7 Xref: g2news1.google.com comp.lang.ada:15525 Date: 2007-05-04T08:04:41-07:00 List-Id: Hi all, I work with GNAT 3.15 on Windows XP. My problem is that I want structure my program in a way that is not accepted by GNAT, but I cannot understand why. My code (schematic only): task t is entry e; end t; task body t is procedure p is begin accept e; end p; begin p; end t; GNAT tells me: "enclosing body for accept must be a task". But - the accept in procedure p _is_ in a task. So why is this not allowed? My accept statement is a bit longer and needed a few times in different situations. Therefore I don't want to "copy and paste" this code directly in the task body. Gerd