[ooc-compiler] FOR Loops And Structured Variables
Brought to you by:
mva
|
From: August K. <fus...@co...> - 2006-03-20 12:52:56
|
Hi,
Why doesn't the following module compile?
MODULE Test;
VAR a: ARRAY 1 OF LONGINT;
BEGIN
FOR a[0] := 0 TO 1 DO END
END Test.
I've read that in Modula, loop variables in FOR loops cannot come from
structured variables, but I can't find that restriction in the Oberon-2
report. Anyway, what's the motivation for the restriction?
Regards,
August
|