August Karlstrom
2018-02-07 11:34:10 UTC
If I compile this module with Niklaus Wirth's PO2013 compiler I get
"level error, not accessible":
MODULE M;
VAR x: INTEGER;
PROCEDURE P;
VAR x: INTEGER;
PROCEDURE Q;
BEGIN
x := 0
END Q;
END P;
END M.
Without the local declaration of x it compiles. I find this strange as
the compiler should only search the (strictly) local and the global
scope for identifier declarations. Can this restriction be found in the
language report?
-- August
"level error, not accessible":
MODULE M;
VAR x: INTEGER;
PROCEDURE P;
VAR x: INTEGER;
PROCEDURE Q;
BEGIN
x := 0
END Q;
END P;
END M.
Without the local declaration of x it compiles. I find this strange as
the compiler should only search the (strictly) local and the global
scope for identifier declarations. Can this restriction be found in the
language report?
-- August