From: Egil Harald Hoevik <egil.harald.hoevik@kongsberg.com>
Subject: Re: Renaming an abstract function
Date: Sat, 17 Nov 2001 18:47:21 +0100
Date: 2001-11-17T18:47:21+01:00 [thread overview]
Message-ID: <3BF6A2A9.C50750D5@kongsberg.com> (raw)
In-Reply-To: b4682ab7.0111161908.1d330e1@posting.google.com
Adam Beneschan wrote:
>
<snip>
> A "callable entity" is defined (in 6(2)) to be a subprogram or entry.
> Thus an abstract subprogram is a callable entity even though you can't
> really call it.
>
RM 6 (1):
"...The definition of a subprogram can be given in two parts:
a subprogram declaration defining its interface, and a subprogram_body
defining its execution..."
So, a subprogram (callable entity) requires a body (callable construct),
while an abstract subprogram does not,
and the RM distinguishes between the two:
RM 6.1 (2-3):
subprogram_declaration ::= subprogram_specification;
abstract_subprogram_declaration ::=
subprogram_specification is abstract;
> I don't see any prohibition on renaming an abstract subprogram.
> However, renaming subprograms don't quite take on all the
> characteristics of the subprograms they rename; see 8.5.4(12) for
> instance. I suspect that has something to do with why renaming an
> abstract subprogram could lead to an error, but I don't have time
> right this minute to look into it further.
>
> -- Adam
Well,
RM 8.5.4 (2):
subprogram_renaming_declaration ::=
subprogram_specification renames callable_entity_name;
If renaming an abstract subprogram were allowed, I,
at least, would think that the language would explicitly
require the keyword 'abstract' in the renaming declaration
(which it does not).
~egilhh
--
"What I seek is to serve, with my feeble capacity,
truth and justice at the risk of pleasing no-one."
Albert Einstein.
next prev parent reply other threads:[~2001-11-17 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-15 23:52 Renaming an abstract function Nick Roberts
2001-11-16 14:52 ` Stephen Leake
2001-11-17 3:08 ` Adam Beneschan
2001-11-17 17:47 ` Egil Harald Hoevik [this message]
2001-11-17 18:33 ` Stephen Leake
2001-11-17 22:00 ` Mark Biggar
2001-11-17 23:17 ` Nick Roberts
2001-11-19 15:38 ` Stephen Leake
2001-11-22 3:14 ` Nick Roberts
2001-11-23 15:40 ` Stephen Leake
2001-11-24 3:55 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox