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.66.150.33 with SMTP id uf1mr30520180pab.33.1421829351287; Wed, 21 Jan 2015 00:35:51 -0800 (PST) X-Received: by 10.140.104.166 with SMTP id a35mr13339qgf.20.1421829351241; Wed, 21 Jan 2015 00:35:51 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!newsfeed.datemas.de!enother.net!enother.net!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!h15no1095434igd.0!news-out.google.com!l7ni1qai.0!nntp.google.com!v8no2501643qal.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Jan 2015 00:35:51 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.71.180.114; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 193.71.180.114 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Use of expression function in protected type From: Egil H H Injection-Date: Wed, 21 Jan 2015 08:35:51 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2019 X-Received-Body-CRC: 2187577482 Xref: news.eternal-september.org comp.lang.ada:24664 Date: 2015-01-21T00:35:51-08:00 List-Id: On Tuesday, January 20, 2015 at 11:34:54 PM UTC+1, Simon Wright wrote: > 9.4(8) says a protected_operation_item can be, inter alia, a > subprogram_declaration or a subprogram body. (subprogram_declaration? > how can that be?) Just like a package can have subprograms declared in the public part, private part or the body, protected subprograms can be declared in the public part, private part or body of a protected type. (For example, it's not uncommon for a barrier function to be declared in the body.) And just like in a package body, forward declarations (or subprogram_declarations) are allowed for subprograms. However, an expression_function is allowed to complete a subprogram_declaration, but is not itself a subprogram_declaration (ARM 6.1(30/3). As far as I can tell, it's a basic_declaration, which is allowed in package specifications and bodies, but not in protected_operation_items. -- ~egilhh