Display overload are called with one output argument
Bug Description
Display overload are called with one output argument. This prevents code factorization between display overloads and string() overloads
Steps to reproduce
function %user_p(x)
disp(argn(1))
end
tlist("user","x",1)
ans =
1.
This is even strange that argn(1)
is equal to one in a macro which has no output argument without triggering an error.
Remark
This issues prevents code factorization in #16940 (closed) definitive fix. For example, you cannot choose between display and string output by testing argn(1)
.
Edited by Stéphane MOTTELET