Thanks Stephane and Samuel for the prompt reply, so I could move forward with
the functional programming method instead of keep trying to emulate the OOP
way.
Best Regards,
Chin Luh___
users mailing list
users@lists.scilab.org
http://lists.scilab.or
Hello Chin Luh,
Yes, it's a very good question. As far as i know -- and i tried various
things, as you did --, this is currently not possible.
The missing feature is the "this" object, refering to the /parent/
structure of which the function is a field.
This would be a very nice feature, enabli
Hi,
--> my_struct.func(my_struct)
is the only way. This is not possible to it the way you would like, it
would need real object-oriented features which Scilab does not have.
At least, we could mimic this if field extraction could be overloaded.
S.
Le 01/07/2020 à 05:44, Chin Luh Tan a écrit
Hi,
I am wondering if this is possible:
I've a structure with data and function pointer, for example:
mystruct.data = 5;
mystruct.func =%myfun
calling mystruct.func() will call myfun with the input of mystruct.data.
To put it in example, this is what I tried:
// define an in