Hello,

Scilab 6.1.0 brings a feature about clearing mlists, that can now be overloaded.

However, it's a special overloading feature, that does not replace the role of clear(), but that comes in addition to it, as documented in the clear page: https://help.scilab.org/docs/6.1.0/en_US/clear.html

"Note: |clear()|can be overloaded for any|mlist("foo")|type, by defining a|%foo_clear()|macro. It will be called either when|clear|is explicitly applied to any mlist of this type, or implicitly when any mlist of this type is deleted when leaving the environment where it has been defined."

Now, when i try to use this feature, i do not get what i understand we should expect. Example:

--> m = mlist("test");
--> typeof(m)
 ans  =
  "test"

--> function %test_clear()
  >     disp("mlist test cleared")
  > endfunction

--> clear m
-->     <<<< nothing is printed. We would expect "mlist test cleared", wouldn't we?


What am i doing wrong?

Regards
Samuel

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to