[Scilab-users] gcf()
Adrien Vogt-Schilb
vogt at centre-cired.fr
Mon Jul 29 14:40:14 CEST 2013
On 29/07/2013 10:33, Dang, Christophe wrote:
> Hello,
>
>> De : Adrien Vogt-Schilb
>> Envoyé : vendredi 26 juillet 2013 23:29
>>
>> I thought that ==[] should be discouraged.
> For which reason?
>
> Regards
>
hey
I don't remember!
I remember that in general empty matrices are tricky when used with
booleans, for instance this example displays nothing:
if find([1 2 3]==4)
disp yes
end
if ~find([1 2 3]==4)
disp no
end
and is therefore different from this one
if find([1 2 3]==4)
disp yes
else
disp no
end
I also vaguely remember that [] counts as true in some languages and
false in some other languages. And that x==[] "should" return false for
any x, but returns true is x is empty in scilab, which is not standard
(if i remember well).
Quite far from the original winsid()==[] (which works fine btw), but the
idea is to get used not to test empty matrices when coding because it's
messy.
(again, I'm not sure about this)
-- Adrien Vogt-Schilb (Cired) +33 (0) 1 43 94 73 83
More information about the users
mailing list