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

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

[Octave-bug-tracker] [bug #47676] Error applying multiplication-assignme


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script
Date: Thu, 14 Apr 2016 01:55:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #6, bug #47676 (project octave):

Oops -- most of my comment was chopped off.

The gist was that if a script sets  foo = zeros(100,100), then


foo /2


would result in [1,1] with no warning that something was amiss.

As I've argued in the past, giving completely the wrong number with no warning
makes Octave untrustworthy.  IMHO, there should be a separate Item Group for
this serious class of "non-errors", since "incorrect result" is a catch-all
for any incorrect behaviour.

Perhaps the parse tree could flag that something was deemed to be a
"function", and this could be checked by subsref of non-function types, either
to give a more informative error or ideally to trigger a reparse of the code.

Another alternative would be to explicitly check after each script invocation
whether new variables were created.  If so, a reparse could again be triggered
(if it is then possible to continue execution from that point).

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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