[Oberon] Oxford Oberon-2 Compiler and local procedures
Chris Burrows
chris at cfbsoftware.com
Sat Nov 29 02:07:55 MET 2008
>
> Chris Burrows wrote:
> >> From: oberon-bounces at lists.inf.ethz.ch
> >> [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of August
> >> Karlstrom
> >> Sent: Thursday, 27 November 2008 7:39 PM
> >> To: ETH Oberon and related systems
> >> Subject: Re: [Oberon] Oxford Oberon-2 Compiler and local procedures
> >>
> >> The document "Oberon at a glance" also says the following
> >> about Oberon-07:
> >>
> >> "No access to variables that are neither global nor strictly
> >> local" (*)
> >>
> >> However, I can't find it in the Oberon-07 report.
> >
> > It is there but can be easily overlooked. See Section 10. 'Procedure
> > Declarations'. In the Oberon-2 Report it states:
> >
> > "Objects declared in the environment of the procedure are
> also visible in
> > those parts of the procedure ..."
> >
> > In the Oberon-07 Report it states:
> >
> > "... the objects declared in the environment of the
> procedure are also
> > visible in the procedure (with the exception of variables ..."
>
> To me this says nothing about prohibited access to non-strictly local
> variables.
>
I had to read it a couple of times to make sure. The additional occurrence
of the word 'of' is crucial in that sentence.
"... with the exception of variables and of those objects that have the
same name as an object declared locally"
means something very different from how I suspect you may be reading it:
"... with the exception of variables and those objects that have the same
name as an object declared locally"
Also, to avoid additional misinterpretations it might be better to say "with
the exception of non-global variables", however, the clarification in
"Oberon at a Glance" should minimise any doubts.
Unfortunately, the nature of the English language makes it less than ideal
for the specification of a computer language. If you are interested in
previous attempts to achieve unambiguous watertight language definitions
see:
"Some reflections on Modula-2 standardization"
http://www.scifac.ru.ac.za/cspt/sc22wg13.htm
(Warning: it is painful)
Somehow the eminently readable 25 page Modula-2 Report turned into a
virtually incomprehensible document with more than 500 pages!
Chris Burrows
Armaide: ARM Oberon-07 Development System for Windows
http://www.armaide.com
More information about the Oberon
mailing list