On 9 Feb 2005 at 8:10, Markus Gerwinski wrote:
Hi Folks,
compiling the program
Program Test;
var x: integer;
Function foo: integer;
Procedure bar; begin (* bar *) result:= 7; end (* bar *);
begin (* foo *) bar; end (* foo *);
begin x:= foo; end.
yields an error message
test.pas: In procedure `bar': test.pas:14: error: invalid access to `Result' test.pas: In function `foo': test.pas:20: error: result of function not assigned
Bug or feature?
The program should compile, because it compiles under Delphi, and the "Result" stuff is there for Delphi compatibility (although I think that Delphi should really not compile such a thing, that is beside the point).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/