Jonas Maebe wrote:

On 01 Jun 2009, at 14:39, Coco Pascal wrote:

But if I add the following function it returns wrong results. This one does refer to other code.

function Y_Odd(const AValue: LongInt): LongInt; cdecl; export;
begin
if Odd(AValue) then
Result := -1
else
Result := 0;
end;

It doesn't anymore once it is compiled, because odd() gets inlined.

So, what do think? A simple module contains two simple functions. On win32 it works fine. On lin32 one function works as expected, the other returns garbage (0 or null). Is the problem linux, firebird or fpc related?
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to