[ooc-compiler] No warning with undefined array variables
Brought to you by:
mva
|
From: August K. <aug...@ya...> - 2006-07-28 07:53:44
|
Hi,
If I use a variable of a primitive type before it's
defined, I get a warning from oo2c. That is not the
case with array variables. Why is that?
Example:
[august src]$ cat Test.Mod
MODULE Test;
IMPORT Out;
PROCEDURE P*;
VAR s: ARRAY 10 OF CHAR;
k: LONGINT;
BEGIN
Out.String(s); Out.Ln;
Out.Int(k, 1); Out.Ln;
END P;
END Test.
[august src]$ oo2c -M -r .. Test.Mod
/home/august/prog/oberon/test/src/Test.Mod:10:15:
Warning: Undefined variable
Regards,
August
|