[Oberon] Unneeded restrictions on local procedures
August Karlstrom
fusionfile at gmail.com
Tue Dec 19 20:20:13 CET 2023
In two recent threads we have discussed scopes and local procedures in
Oberon-07. One thing that I have been thinking about is that since the
change was made to prevent access to intermediate scopes the restriction
that a local procedure cannot be assigned to a procedure variable or
passed as a procedure parameter no longer makes any sense. The sentence
"P must not be declared local to another procedure, and neither can it
be a standard procedure."
in section 6.5 should be replaced with
"P cannot be a standard procedure."
and
"If a formal parameter specifies a procedure type, then the
corresponding actual parameter must be either a procedure declared
globally, or a variable (or parameter) of that procedure type."
in section 10.1 should be replaced with
"If a formal parameter specifies a procedure type, then the
corresponding actual parameter must be either a procedure, or a variable
(or parameter) of that procedure type."
What do you think?
Regards,
August
More information about the Oberon
mailing list