Questions tagged [precedence]

For questions about operator precedence.

Filter by
Sorted by
Tagged with
65
votes
2answers
4k views

when is f@g not the same as f[g]?

I have always thought that f@g will give the same result as f[g] in all cases, and it is just a matter of style which one to use ...
22
votes
4answers
955 views

Making a symbol's new definitions be tried before all previously defined ones

Is there any way to "close" a package (or a symbol, or a context) in that if a user of the package adds definitions to the symbol they will be tried before the package defined ones, just like what ...
35
votes
3answers
1k views

Prefix operator with low precedence

The question is simple, but I will elaborate on the background as well for those interested in the idea: How to define a new operator with specified precedence value? Background Mathematica was ...
8
votes
4answers
510 views

Change Operator Precedence of --> operator

I am trying to use --> operator with highest precedence ...
9
votes
1answer
218 views

Bug in grouping after editing code?

Bug introduced in 7.0 or earlier and persisting through 11.0 While looking at A question about conditional replacement I think I discovered a bug in the Front End that affects both 7.0.1 and 10.0.1 ...
9
votes
2answers
250 views

Which operators are missing from the official precedence table?

I often use the Operator Input Forms page as a reference for operator precedence as well as which (used or unused) operators exist. However, I just noticed that at least one operator is missing from ...
7
votes
1answer
506 views

How to construct custom operators with precedence?

I need to combine data structures in operations analogous to addition, subtraction, multiplication and division (and more). I need more than one operation of each type, i.e. more than one method of ...
4
votes
3answers
347 views

Notation package: parenthesis placement for SuperscriptBox

The question concerns the Notation package. I want to define notation for the function very similar to the built-in Power[a,b] ...
4
votes
1answer
313 views

Why Min cannot be used as constrains of NMinimize?

I met a strange problem when trying to do an optimization. Initialization code, ...