|
From: | Mike Miller |
Subject: | [Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1 |
Date: | Fri, 8 Sep 2017 13:12:26 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #2, bug #51962 (project octave): I don't see how this can be changed honestly. A++ is an expression that modifies the value of A and also returns a value that is different from the value of A. It must always have a side effect returning a value different from the operand, so where else but 'ans' should that value go? The only possible way this could work would be to determine if this expression is the top-level expression in a statement and if there is no lvalue, then suppress returning a copy of A. But that doesn't sound reasonable to me. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51962> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |