[Oberon] Oberon-2 type bound procedure scope
Diego Sardina
dsar at eml.cc
Sat Dec 9 20:09:31 CET 2023
On Sat, Dec 9, 2023, at 11:02, August Karlstrom wrote:
> However, there is an additional rule which says that
>
> "The use of the procedure identifier in a call within its declaration
> implies recursive activation of the procedure."
> (https://miasap.se/obnc/oberon-report.html#sec10)
>
> To me it's not clear if the implicit continuation of this sentence is
>
> A) ...even if the procedure identifier is not within scope or
> B) ...provided that the procedure identifier is within scope.
>
By definition: "The scope extends textually from the point of the declaration to the end of the block (procedure or module)". By saying that, "within its declaration" can be considered the same "within its scope".
It's pretty unambiguous to me that the procedure identifier refers to a local object that identify the procedure itself.
So in your example in both cases Q and R activate recursively in Oberon-07.
--
Diego Sardina
More information about the Oberon
mailing list