[Scilab-users] Dump the output of a function

antoine monmayrant antoine.monmayrant at laas.fr
Wed Jan 17 18:16:15 CET 2018


Hello all,


I might say something really stupid, but can't we define a special 
variable like %eps, %i, etc to act as a black hole ?
Something like %null (like piping to /dev/null or a null pointer) or a 
better name (%blackhole, %lostforever, %byebye, ;-) ).
The idea being that no memory is allocated when someone try to affect 
some value to it:

[%null,%null,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9));

Antoine

Le 16/01/2018 à 14:12, sgougeon at free.fr a écrit :
> Hello Clément,
>
> OK for your confirmation. Unfortunately, in Scilab "_" can't be used, because _() is a defined function aliasing gettext(), and Scilab needs it as is.
>
> I don't think it was a good thing to use a single character to define such an alias, but it is as is.
> It would be unlikely possible to rename it... Would it?
>
> Best regards
> Samuel
>
> ----- Mail original -----
> De: "Clément David"
> À: users at lists.scilab.org
> Envoyé: Mardi 16 Janvier 2018 09:31:20
> Objet: Re: [Scilab-users] Dump the output of a function
>
> Hello Christian, Samuel,
>
> My 2c, most of the modern languages supporting such a feature are using the one-character variable
> trick; sometimes enforced by conventions. For example, Go, Rust and Python are using `_` as in :
>
> [_,_,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9));
>
> This character appears as a visual blank thus the function call is easily readable.
>
> Regards,
>
> --
> Clément
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list