[ooc-compiler] Assignment of local procedures
Brought to you by:
mva
|
From: August K. <fus...@co...> - 2007-02-20 18:52:41
|
Hi,
With OO2C 2.1.11 the following module compiles and prints "0".
MODULE Test;
IMPORT Out;
PROCEDURE Q(p: PROCEDURE); BEGIN p END Q;
PROCEDURE P;
VAR n: LONGINT;
PROCEDURE Inner; BEGIN INC(n) END Inner;
BEGIN
n := 0;
Q(Inner);
Out.Int(n, 0); Out.Ln
END P;
BEGIN
P
END Test.
Standard Oberon-2 does not support closures but even if it did I think
the result should be "1".
Comments?
August
|