[Scilab-users] tlist

Samuel Gougeon sgougeon at free.fr
Sat Feb 29 20:34:23 CET 2020


Le 28/02/2020 à 22:52, Federico Miyara a écrit :
>
> Dear all,
>
> The documentation of rationals 
> (https://help.scilab.org/docs/6.1.0/en_US/rational.html) mentions
>
>  R = tlist(['r','num','den','dt'], Num, Den,[])
>
> However, if one attempts to create a rational with this syntax the 
> result is an error message. Is it because the first argument is sort 
> of protected and cannot be redefined?
>
> If this is the case it would be great if it were clarified in the 
> documentation to avoid confusion.


You are right, Federico. The message should be

  * clearer, something like "The reserved typeof 'r' can't be used here.
    Please use rlist()."
  * extended to other reserved native overloading type codes or/and typeof :
    https://help.scilab.org/docs/6.1.0/en_US/overloading.html
    https://help.scilab.org/docs/6.1.0/en_US/typeof.html

But this must be done with care, because some internal objects like 
state-space systems or Xcos objects, or others, use mlist() or tlist() 
as we do for true custom external typeof.
Such a protection is the aim of the quite old but still alive report 
#2307 <http://bugzilla.scilab.org/show_bug.cgi?id=2307>.

Regards
Samuel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200229/46ed4fb9/attachment.htm>


More information about the users mailing list