PrecedenceForm[expr,prec]
prints with expr parenthesized as it would be if it contained an operator with precedence prec.
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.
Examples
open all close allBasic Examples (1)
Scope (1)
Define an operator |> using Infix:
s = Infix[{a, b}, "|>"]Give the operator precedence higher than Plus but lower than Times:
PrecedenceForm[s, 350] + yPrecedenceForm[s, 350] yGive the operator precedence higher than both Plus and Times:
PrecedenceForm[s, 500] + yPrecedenceForm[s, 500] yGive the operator lowest precedence:
PrecedenceForm[s, 1] + yPrecedenceForm[s, 1] ySee Also
Tech Notes
Related Guides
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), PrecedenceForm, Wolfram Language function, https://reference.wolfram.com/language/ref/PrecedenceForm.html.
CMS
Wolfram Language. 1988. "PrecedenceForm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PrecedenceForm.html.
APA
Wolfram Language. (1988). PrecedenceForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PrecedenceForm.html
BibTeX
@misc{reference.wolfram_2026_precedenceform, author="Wolfram Research", title="{PrecedenceForm}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/PrecedenceForm.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_precedenceform, organization={Wolfram Research}, title={PrecedenceForm}, year={1988}, url={https://reference.wolfram.com/language/ref/PrecedenceForm.html}, note=[Accessed: 12-June-2026]}