2010/1/31 Paul van Helden <p...@planetgis.co.za>: > function TMyClass.GetValue_overloaded(SomeValue: Integer): Integer; > begin > case SomeValue of > 1: Result:=GetValue_overloaded; // compiler warning: "Function result > variable does not seem to be initialized" (!) > 2: Result:=GetValue_not_overloaded; > else > Result:=3; > end; > end;
Isn't the "GetValue_overloaded" in 1: Result:=GetValue_overloaded the return value of the function? Maybe you should call it this way: Result:= GetValue_overloaded() That's why I think you get the warning. The reason you might be getting random results is that the return value has not been initialized. -- cobines _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel