Markus Gerwinski wrote:
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?
Feature. The program is flat out wrong and gpc is telling you how and where. Replace "result" with "bar" in bar, and "bar" with "foo = bar" in foo, and it should compile and run.