Re: [ooc-compiler] No warning with undefined array variables
Brought to you by:
mva
|
From: Michael v. A. <mic...@gm...> - 2006-07-28 08:29:53
|
On 28/07/06, August Karlstrom <aug...@ya...> wrote: > > 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? Correct. The one was easy to do, the other not. Both arrays and records are written piecemeal, and parts can therefore be defined or undefined. So I decided to skip the warnings for them altogether. -- mva 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 > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > ooc-compiler mailing list > ooc...@li... > https://lists.sourceforge.net/lists/listinfo/ooc-compiler > |