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

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

[Octave-bug-tracker] [bug #44793] assert([]) is valid


From: Rik
Subject: [Octave-bug-tracker] [bug #44793] assert([]) is valid
Date: Thu, 09 Apr 2015 16:25:44 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

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

I just checked and we have had assert([]) be a no-op since at least version
3.2.4 of Octave.  Maybe we should change that?  In scripting languages like
Perl the empty value, such as "", is interpreted as false and so assert
(false) should produce an error.

In other cases in Octave we do assume that [] is false.  For example,


if ([])
   disp ("True");
else
   disp ("False");
endif


prints out False.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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