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

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

[Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1"


From: Rik
Subject: [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not
Date: Sun, 10 Sep 2017 00:08:32 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #9, bug #51962 (project octave):

I had more in mind lazy evaluation so that the pre- and postfix timing was
still respected, but that the actual operation was performed by the in-place
operator.

C doesn't have an 'ans' variable and Matlab doesn't have '++'/'--' operators
so there is no compatibility requirements that say we couldn't make these
operators do somethin special, like not return the ans variable.

But I'm also not too bothered if we just want to document the difference.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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