Hello everybody !
I just encountered a problem while trying to use CECIL with ISE compiler
on Linux, and I was wondering whether anybody here might have already
seen it. It's my first try with CECIL, so i may not know everything which
is required...
I'm trying to call this Eiffel method from C.
set_values(px, py : REAL) is
...
So, i do something like
c_function(EIF_OBJECT e_object)
{
float value1, value2;
...values computations...
EIF_PROCEDURE proc;
proc = eif_procedure("set_angular_position", solar_system_type);
(proc)(eif_access(e_object), value1, value2);
}
in a function called by Eiffel, with e_objet set to current.
Actually, i followed CECIL array example, using floats instead of ints.
However, it did not seem to work with REAL. While the procedure is called
correctly, the values I get on C side are irrelevant, though they change
along C values.
I tried this code with INTEGER and int, and it worked flawlessly, like in
CECIL example. Is there someting special to do before using REAL and
floats ? I wouldn't have to revert to old style fixed decimal numbers.
By the way, i do that in order to do some calculations on C side, and get
the result back in Eiffel. Is there another way than using a set_values
procedure ? I haven't found a way to set a class attribute, since values
are copied when using eif_attribute.
Thanks,
Mathieu