this small codes reports error on the ide
unit TestUnit;
interface
uses
SysUtils;
function div2(a : LongInt; b : LongInt) : LongInt;
implementation
function div2(a : LongInt; b : LongInt) : LongInt;
begin
Result := a div b;
if (a mod b) > 0 then
begin
Inc(Result);
end;
end;
end.
the error message is Identifier not found "Result", this need change the fpc compile option from "-mfpc" to "-mobjfpc" , but can nof find any area to change this