PrecedenceForm

PrecedenceForm[expr, prec]
prints with expr parenthesized as it would be if it contained an operator with precedence prec.

DetailsDetails

  • prec must be an integer. See notes for Infix.
  • PrecedenceForm acts as a "wrapper", which affects printing, but not evaluation.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Force parenthesization by lowering the effective precedence of multiplication:

In[1]:=
Click for copyable input
Out[1]=
New in 1
New to Mathematica? Find your learning path »
Have a question? Ask support »