octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43097] if (object) should call if (logical(ob


From: Colin Macdonald
Subject: [Octave-bug-tracker] [bug #43097] if (object) should call if (logical(object))
Date: Thu, 28 Aug 2014 09:02:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

Follow-up Comment #1, bug #43097 (project octave):

Hmm, perhaps that example is not convincing given weird other "True" value. 
Here's a better one, which should convince you we should fix this :)


>> pkg load octsympy
>> q = sym(10)
q = (sym) 10
>> if (q), disp("hello"); end
>> if (logical(q)), disp("hello"); end
hello


Nonzero should be true, great potential to confuse users!

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43097>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]