Re: [Scilab-users] [SEP] [boolean integer_class] concatenations

2018-04-22 Thread Samuel Gougeon

Le 17/04/2018 à 18:49, Samuel Gougeon a écrit :


Hello,

Surprisingly, as reported in http://bugzilla.scilab.org/15534, after 
30 years, Scilab still does not know how to concatenate booleans with 
encoded integers.

For instance :

--> [%f int8(-3)]

Undefined operation for the given operands.
check or define function %b_c_i for overloading.
It is surprising, because

  * For some languages like Octave, booleans are actually some numbers
restricted to 0|1, and such simple concatenations are available.
  * Implementing it in Scilab is trivial and does not really set any
question, since both 0 and 1 are present in all Scilab integer
classes.

An implementation is proposed for Scilab 6.1 (see the bugzilla report).

Comments are welcome.



No comments?

The only reason i have found to understand why this is still not 
implemented would be to let the user define its own overloads. But which 
alternative to casting %f=>0 %t=>1 could we have?
The first and may be only one we could imagine would be to cast integers 
into booleans, as in

[%t int8([0 -5])] => [%t %f %t]

Why not choosing this, instead of [%t int8([0 -5])] => int8([1 0 -5])?
It's a poorer result, that can be obtained in a straightforward way as
[%t int8([0 -5])]  =>  int8([1 0 -5])~=0

Regards
SG

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


[Scilab-users] dos() bug: code or documentation issue?

2018-04-22 Thread Samuel Gougeon

Hello,

In the dos() help page https://help.scilab.org/docs/6.0.1/en_US/dos.html ,
it is written:

/Standard output and standard errors of the shell command are written in 
the calling shell./


However, for instance the commands

--> consolebox on
--> dos dir // shows nothing in the consolebox
--> dos dira// shows no error in the consolebox

The same behavior can be seen as soon as with Scilab 5.0 (where 
consolebox has been introduced).. and up to 5.5.2 and 6.0.1 now.


Is it a dos() bug, or a documentation error?

Regards
Samuel Gougeon

PS: by the way, dos(), unix*() and host() are duplicates. More code, 
more bugs..


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