[Oberon] undefined record field when compiling in NO.

Jan Verhoeven jan at verhoeven272.nl
Sat Jan 4 01:27:08 CET 2014


On Friday 03 January 2014 09:21:08 peasthope at shaw.ca wrote:
> In the alpha release of NO, the compiler applied to
>
> MODULE Test;
> IMPORT  ConfigInput;
> PROCEDURE Frame(F: ConfigInput.Frame);
> VAR x: INTEGER;
> BEGIN
> 	x := F.x
> END Frame;
> BEGIN END Test.
>
> reports
>  compiling Test
> 		pos    105  err  83	undefined record field
> .
> This is in ConfigInput.
> TYPE
> 	Frame* = POINTER TO RECORD (Display.Frame)
> 		keys: SET;
> 		x, y: INTEGER;
> 		text: Texts.Text
> 	END;
>
> So F.x in Test should be legitimate.
> Can anyone explain why the compiler complained?
>
> Thanks,             ... Peter E.

It may be confusing for the compiler that you have a TYPE called Frame 
and a PROCEDURE called Frame.
Also there are two instances of 'x'. One local to Frame and the other 
local to Frame.

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl



More information about the Oberon mailing list