<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
Here is a strange -- rather unexpected -- trivial behavior:<br>
<br>
<font size="-1"><tt>--> p = 0; p==-1:1</tt><tt><br>
</tt><tt>Undefined operation for the given operands.</tt><tt><br>
</tt><tt>check or define function %b_b_s for overloading.</tt><tt><br>
</tt></font><br>
I would have expected<font size="-1"><tt> [%f %t %f]</tt></font>,
but "==" 's priority is higher than ":"'s one,<br>
and the expression is parsed <tt>(p==-1):1</tt>.<br>
It's the same with other comparisons, like <tt>p>-1:1</tt>.<br>
<br>
It was the same behavior in Scilab 5.5.2.<br>
<br>
Since by default ":" is defined and meaningful for a very limited<br>
set of operands types: numbers and text (, and that ":" does not<br>
accept a vector asĀ operands), what about inverting the comparisons<br>
and ":" relative priorities, in order to parse <tt>p==(-1:1)</tt> ?<br>
<br>
"~" and comparisons relative priorities are inverted in Scilab 6.<br>
That's more handy. IMO here is another opportunity get a more<br>
relevant and handy behavior, by inverting ":" and comparisons ones.<br>
<br>
Don't you think so?<br>
Regards<br>
<br>
Samuel<br>
<br>
</body>
</html>