[Oberon] Intermediate scopes in Oberon-07

August Karlstrom fusionfile at gmail.com
Fri Feb 9 11:37:32 CET 2018


On 2018-02-09 11:09, Andreas Pirklbauer wrote:
> Only access to intermediate *variables* has been restricted in the 
> Oberon-7 language revision.
But then you may ask why only access to local and global objects are 
mentioned in the language report:

"In addition to its formal parameters and locally declared objects, the 
objects declared globally are also visible in the procedure."

In the preface of Project Oberon 2013 we are also told that

"Objects declared in a procedure P are not accessible within a procedure 
Q that is itself local to P. That is, objects must be either strictly 
local or global in order to be accessible."

To my understanding an object in this context is either a constant, a 
type, a variable or a procedure.

> Access to intermediate *constants* declared in the surrounding scopes
> 
> continues to be allowed in Oberon-7 (constants never used the static
> 
> link anyway). See the guard (y.class # ORB.Const) in the last line
> 
> of procedure ORG.MakeItem.

This seems to be true also for types.


-- August


More information about the Oberon mailing list