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: anonymous
Subject: [Octave-bug-tracker] [bug #54698] Precedence of call/indexing operator over transpose operator
Date: Thu, 20 Sep 2018 13:51:46 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:51.0) Gecko/20100101 Firefox/51.0

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

Assuming that we have an operand A and two postfix operators OP1 and OP2.
So in the following expression:


A OP1 OP2


If OP1 takes higher precedence over OP2 then OP1 should apply to the operand
before OP2.
If OP2 takes higher precedence over OP1 then OP2 should apply to the operand
before OP1.
If both of OP1 and OP2 has equal precedence then the _left to right rule_ of
MATLAB applies and OP1 should apply to the operand before OP2.

Some interesting results:

The following expressions should produce the same result:


A.'(X)(Y)(Z)
A(X).'(Y)(Z)
A(X)(Y).'(Z)
A(X)(Y)(Z).'


The following expressions should produce the same result:


A.'(W)(X).'(Y).'(Z)
A.'(W).'(X).'(Y)(Z)
A(W).'.'(X).'(Y)(Z)
A(W)(X).'.'.'(Y)(Z)
A(W)(X)(Y)(Z).'.'.'


If the current Octave behavior is the desired one let me to post some
workarounds in the following posts.


    _______________________________________________________

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]