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

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

[Octave-bug-tracker] [bug #54698] Precedence of call/indexing operator o


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #54698] Precedence of call/indexing operator over transpose operator
Date: Fri, 21 Sep 2018 11:19:08 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Follow-up Comment #10, bug #54698 (project octave):

Yes, my guess is that the claim on right-to-left associativity for the postfix
inc/dec operators is borrowed from the C++ precedence rules. But that
associativity really only matters when combining the inc/dec operators with
other unary operators of the same precedence level, like the C++ expressions
'*a++' or '!b--'. Since '++' and '--' can't be combined without using a binary
operator of a lower precedence, I don't think we need to claim that they
associate from right to left in Octave.

But the Octave postfix inc/dec operators do have higher precedence than the
exponent operator. The expression 'a^b++' is not the same as '(a^b)++', which
would be the result if they all had equal precedence and left to right
associativity.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54698>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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