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

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

[Octave-bug-tracker] [bug #32533] Operator precedence for transpose inco


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #32533] Operator precedence for transpose incorrect
Date: Tue, 19 Apr 2011 02:46:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110107 Iceweasel/3.5.16 (like Firefox/3.5.16)

Follow-up Comment #12, bug #32533 (project octave):

I'm attaching a new version of the patch.  It makes the precedence levels the
same as Matlab, except for the operators that Matlab does not have (OP=,
++/--, and <</>>).

I also fixed the test for exponentiation.  Matlab docs specifically note that
exponentiation is handled left to right.  That's odd to me, but I don't see a
compelling reason to do things differently.

I also changed the precedence levels of the || and &&, and | and & operators
to match Matlab, with the OR operators having lower precedence than the AND
operators.  Should we try to warn about this change in 3.6?

How should we fix the tests for increment and decrement?  The test that
results in an error for an invalid lvalue should be fixed, I think.  The
current precedence settings have ++ and -- highest of all except indexing. 
But what about ---a?  That is an incompatibility with Matlab that will be
pretty much impossible to fix.  OTOH, it is probably not something that comes
up too often.

Speaking of the left and right shift operators (<<, >>), should we remove
them?  Should we bother deprecating them, or just remove them?  There is no
actual use of these operators in any Octave scripting code, but users could
have defined objects that use them.  I don't see any in Octave Forge packages
though, so maybe it would be OK to just dump them in 3.6.

I'm attaching the new version of the patch.  I'd like to get feedback, but
please don't check it in just yet.

(file #23270)
    _______________________________________________________

Additional Item Attachment:

File name: diffs.txt                      Size:9 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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