Menu

#2 can not change compiler options

open
nobody
editor (1)
5
2009-06-11
2009-06-11
Anonymous
No

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

Discussion


Log in to post a comment.

MongoDB Logo MongoDB