I find this strange, as the compiler should only search the (strictly)NW's PO2013 compiler apparently only disallows access to *variables*
local and the global scope for identifier declarations.
It doesn't say that non-variable objects from intermediate scopes are
visible in a procedure.
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?
Hi,
On Thursday, February 8, 2018 at 10:55:13 AM UTC-6, August Karlstrom wrote:
It doesn't say that non-variable objects from intermediate scopes are visible in a procedure.
Why wouldn't they be?
AFAIK, the main advantage to this restriction (re: variables) is only simplified stack management.
Who knows, maybe that is for better error-checking of old (presumably Oberon-2) code being updated.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 376 |
Nodes: | 16 (2 / 14) |
Uptime: | 39:36:08 |
Calls: | 8,039 |
Calls today: | 3 |
Files: | 13,037 |
Messages: | 5,830,443 |