11
votes
Table of precedence values for all System` symbols
You can use Precedence to get the precedence for a symbol. The following code produces an association with precedences as keys, and symbol names corresponding to ...
11
votes
Accepted
How exactly does Postfix notation work?
I would have expected this to either be the same as (a // f) /.a ->1, or as applying the replacement rule first and then the function ...
10
votes
Accepted
Change Operator Precedence of --> operator
How about overloading the LongRightArrow with a special rule for Part[...] as the second argument?
...
9
votes
i_:0|1 varies in v12.1: incompatible change or bug?
I expect that this was a bugfix that corrected an inconsistency between how the Front End and the kernel parse this code. Here's a comparison from M12.0.0:
...
8
votes
Which operators are missing from the official precedence table?
Finding All Operators and Their Precedence, Arity, Affix, and Associativity
Sources of Information
There are a few different sources of information about operators and their properties. I list all ...
8
votes
Which operators are missing from the official precedence table?
We can read the Front End resource as I did for List of symbols without built-in meaning.
UnicodeCharacters.tr itself contains the parsing precedence information, ...
8
votes
Change Operator Precedence of --> operator
You could give LongRightArrow a HoldRest attribute and manipulate the right hand side.
Perhaps something like:
...
7
votes
Accepted
Why Divide does not give the same answer?
First, since the precedence of Divide is higher than Times, you should expect to parse ...
7
votes
i_:0|1 varies in v12.1: incompatible change or bug?
I think V. 12.1.1 is correct, because the precedence of Alternatives (|) is larger than that of Optional (:)
...
6
votes
Accepted
Forcing Explicit Parentheses in Traditional Form
Precedence /@ {Cross, CenterDot}
{500., 410.}
You can wrap Cross[..] with PrecedenceForm ...
6
votes
Change Operator Precedence of --> operator
The precedence of LongRightArrow is predetermined as shown in the operator table. You can attempt to circumvent the problem as other answers show but these do not change the binding power of the ...
5
votes
Change Operator Precedence of --> operator
If you don't mind mucking with the internal file UnicodeCharacters.tr (make a copy first!) you can change the line:
...
4
votes
Prefix operator with low precedence
This doesn't really answer your question, but perhaps the introduction of operator forms like Map[f] in M10, as well as a new short form for ...
4
votes
Accepted
Simplify Map on a list of lists
You are mistaken the precedence of the operators. See here.
The way you are writing your expression is not what you expect. You are asking Mathematica to Simplify ...
3
votes
Accepted
Operator Precedence in Notation Package
You need to add an input alias for the TagBox version of the long right arrow:
...
3
votes
Table of precedence values for all System` symbols
Following up Robert Jacobson's comment to Carl Woll's answer while using Andrew Steinacher's NiceGrid from the FunctionRepository, the following yields a less ...
3
votes
Prefix operator with low precedence
Update
An even simpler alternative is to use a TemplateBox so that an additional MakeExpression rules is not needed (as in my ...
2
votes
2
votes
when is f@g not the same as f[g]?
I was making a custom typesetting form (MakeBoxes[] et al.), and happened to notice that Precedence[] works on box forms. This ...
1
vote
Accepted
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
precedence × 22operators × 6
custom-notation × 5
front-end × 3
programming × 2
replacement × 2
notebooks × 2
syntax × 2
undocumented × 2
parsing × 2
functions × 1
simplifying-expressions × 1
bugs × 1
evaluation × 1
pattern-matching × 1
formatting × 1
vector × 1
core-language × 1
variable-definitions × 1
functional-style × 1
map × 1
built-in-symbols × 1
system × 1
boxes × 1
broken-code × 1