﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1158	mismatch of return values (return + pointer) of extrenal function and result structure	Henning Kiel	Henning Kiel	"external C function ""fexttest"" called this way:

{{{
...  
   algorithm
     if HallSignal <> pre(HallSignal) then
       (Check, BBR) := fexttest(omega, HallPos, table);
...
}}}

{{{
function fexttest
  input Real omega;
  input Integer Pos;
  input demoPack_Data PPP;
  output Integer rv;
  output Integer outx;
  external ""C"" rv = exttest(omega, Pos, outx, PPP) annotation(Library = ""exttest.o"", Include = ""#include \""exttest.h\"""");
end fexttest;
}}}
 
The prototype and function call are done properly. But when copied into the result structure, the order is mixed up:
{{{
   rv_ext = exttest(omega_ext, Position_ext, &outx_ext, PPP_ext);
   out.targ1 = (modelica_integer)outx_ext;
   out.targ2 = (modelica_integer)rv_ext;
}}}"	defect	closed	high				fixed		Henning Kiel Martin Sjölund
