({{, (RefLink[PrecedenceForm, paclet:ref/PrecedenceForm])[expr,prec]
prints with expr parenthesized as it would be if it contained an operator with precedence prec. }})

OpenersNotesSection(Spacer1)Details

prec must be an integer. See notes for (RefLink[Infix, paclet:ref/Infix]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Force parenthesization by lowering the effective precedence of multiplication:

a+PrecedenceForm[b c,10]

OpenersExampleSection1(Spacer1)Scope  (1)

Define an operator |> using (RefLink[Infix, paclet:ref/Infix]):

s=Infix[{a,b},"|>"]

Give the operator precedence higher than (RefLink[Plus, paclet:ref/Plus]) but lower than (RefLink[Times, paclet:ref/Times]):

PrecedenceForm[s,350]+y

PrecedenceForm[s,350] y

Give the operator precedence higher than both (RefLink[Plus, paclet:ref/Plus]) and (RefLink[Times, paclet:ref/Times]):

PrecedenceForm[s,500]+y

PrecedenceForm[s,500] y

Give the operator lowest precedence:

PrecedenceForm[s,1]+y

PrecedenceForm[s,1] y

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Infix, paclet:ref/Infix])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Defining Output Formats, paclet:tutorial/DefiningOutputFormats])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Symbolic Notational Forms, paclet:guide/SymbolicNotationalForms])}})}})