PrecedenceForm

PrecedenceForm[expr,prec]

prints with expr parenthesized as it would be if it contained an operator with precedence prec.

Details

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

Examples

open allclose all

Basic Examples  (1)

Force parenthesization by lowering the effective precedence of multiplication:

In[1]:=
Click for copyable input
Out[1]=

Scope  (1)

See Also

Infix

Tutorials

Introduced in 1988
(1.0)