[Oberon] Intermediate scopes in Oberon-07

August Karlstrom fusionfile at gmail.com
Fri Feb 9 11:51:48 CET 2018


On 2018-02-09 10:30, Diego Sardina wrote:
[...]
> Yes, maybe he didn't update PO2013 compiler's implementation.

OK, thanks for the information.

If access to all intermediate objects is disallowed, can a procedure 
signature still reference locally declared types? For instance, is the 
following module valid:

	MODULE test;
	
		PROCEDURE P;
			TYPE T = INTEGER;
	
			PROCEDURE Q(x: T): T;
			RETURN 0
			END Q;
		END P;
	
	END test.

As I understand it, the local scope of Q starts before the list of 
formal parameters but I may be wrong here. Also, one of the reasons for 
disallowing all access to intermediate scopes is that it allows the 
declaration of a procedure to be moved outside or inside another 
procedure without invalidating the module. If the types in the parameter 
list references an intermediate scope the procedure is not really "self 
contained."


-- August


More information about the Oberon mailing list