varn([]) changed

classic Classic list List threaded Threaded
6 messages Options
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

varn([]) changed

Hello,

I was noting that varn([]) changed from Scilab 5 to Scilab 6:

5.5.2:
-->varn([])
          !--error 246
Function not defined for given argument type(s),
   check arguments or define function %s_varn for overloading.

6.0.1:
--> varn([])
  ans  =
     []

This is hard-coded, not in any %s_varn().

This change is not yet documented. I would like to have confirmation
that it is intentional.

Thanks
Samuel


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Antoine ELIAS-2 Antoine ELIAS-2
Reply | Threaded
Open this post in threaded view
|

Re: varn([]) changed

Hello Samuel,

No, it is not intentional, I will take a look to that today.

Antoine.
Le 14/01/2019 à 23:22, Samuel Gougeon a écrit :

> Hello,
>
> I was noting that varn([]) changed from Scilab 5 to Scilab 6:
>
> 5.5.2:
> -->varn([])
>          !--error 246
> Function not defined for given argument type(s),
>   check arguments or define function %s_varn for overloading.
>
> 6.0.1:
> --> varn([])
>  ans  =
>     []
>
> This is hard-coded, not in any %s_varn().
>
> This change is not yet documented. I would like to have confirmation
> that it is intentional.
>
> Thanks
> Samuel
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: varn([]) changed

Hello Antoine,

Le 15/01/2019 à 09:53, Antoine ELIAS a écrit :
Hello Samuel,

No, it is not intentional, I will take a look to that today.

IMO, this is not necessarilly a bad change. Please also consider that remark about applicability of varn() to empty rlist().

Thanks
Samuel


Antoine.
Le 14/01/2019 à 23:22, Samuel Gougeon a écrit :
Hello,

I was noting that varn([]) changed from Scilab 5 to Scilab 6:

5.5.2:
-->varn([])
         !--error 246
Function not defined for given argument type(s),
  check arguments or define function %s_varn for overloading.

6.0.1:
--> varn([])
 ans  =
    []

This is hard-coded, not in any %s_varn().

This change is not yet documented. I would like to have confirmation that it is intentional.

Thanks
Samuel


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Antoine ELIAS-2 Antoine ELIAS-2
Reply | Threaded
Open this post in threaded view
|

Re: varn([]) changed

I'm not sure that empty rlist is properly managed in Scilab

try
a = rlist() //without ;

and overload "%r_varn" tries to access to internal fields that does not exist.
I think the trouble comes from rlist function.

Antoine
Le 15/01/2019 à 10:29, Samuel Gougeon a écrit :
Hello Antoine,

Le 15/01/2019 à 09:53, Antoine ELIAS a écrit :
Hello Samuel,

No, it is not intentional, I will take a look to that today.

IMO, this is not necessarilly a bad change. Please also consider that remark about applicability of varn() to empty rlist().

Thanks
Samuel


Antoine.
Le 14/01/2019 à 23:22, Samuel Gougeon a écrit :
Hello,

I was noting that varn([]) changed from Scilab 5 to Scilab 6:

5.5.2:
-->varn([])
         !--error 246
Function not defined for given argument type(s),
  check arguments or define function %s_varn for overloading.

6.0.1:
--> varn([])
 ans  =
    []

This is hard-coded, not in any %s_varn().

This change is not yet documented. I would like to have confirmation that it is intentional.

Thanks
Samuel


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: varn([]) changed

Le 15/01/2019 à 11:06, Antoine ELIAS a écrit :
> I'm not sure that empty rlist is properly managed in Scilab
>
> try
> a = rlist() //without ;
>
> and overload "%r_varn" tries to access to internal fields that does
> not exist.
> I think the trouble comes from rlist function.

Yes, this is why forbidding rlist() and setting rlist([],[]) to [] is
somewhat proposed
@ http://bugzilla.scilab.org/show_bug.cgi?id=11077#c8
Then, in order to avoid useless errors, the new implementation varn([])
=> []
is rather handy. I don't see any trap that it could yield.

Other users inputs are welcome.

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: varn([]) changed

Le 15/01/2019 à 11:31, Samuel Gougeon a écrit :
> .../...
> Then, in order to avoid useless errors, the new implementation
> varn([]) => []
> is rather handy. I don't see any trap that it could yield.

This change is now documented.

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev