From: Egil H H <ehh.public@gmail.com>
Subject: Re: Use of expression function in protected type
Date: Wed, 21 Jan 2015 00:35:51 -0800 (PST)
Date: 2015-01-21T00:35:51-08:00 [thread overview]
Message-ID: <c92ad8fa-c418-4a06-b917-ed774d218459@googlegroups.com> (raw)
In-Reply-To: <lylhkxnks2.fsf@pushface.org>
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
next prev parent reply other threads:[~2015-01-21 8:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 22:34 Use of expression function in protected type Simon Wright
2015-01-21 8:35 ` Egil H H [this message]
2015-01-21 9:15 ` Simon Wright
2015-01-21 20:44 ` Randy Brukardt
2015-01-22 2:50 ` Randy Brukardt
2015-01-22 18:05 ` 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