Infix

Infix[f[e1,e2,]]

prints with f[e1,e2,] given in default infix form: e1~f~e2~f~e3.

Infix[expr,h]

prints with arguments separated by h: e1 h e2 h e3.

Details

  • Infix[expr,h,precedence,grouping] can be used to specify how the output form should be parenthesized.
  • Precedence levels are specified by integers. In OutputForm, some precedence levels are:
  • x.y.z490
    x y z400
    x+y+z310
    x==y290
    x=y40
  • Possible grouping (associativity) specifications are:
  • NonAssociativenot associativealways parenthesized
    Nonealways associativenever parenthesized
    Leftleft associative (e.g. (a/b)/c)
    Rightright associative (e.g. a^(b^c))
  • The special input form e1~f~e2 is directly interpreted as f[e1,e2] and does not involve Infix. »

Examples

open allclose all

Basic Examples  (2)

Display f[x,y] in infix form:

Use a custom string as the infix operator:

Possible Issues  (1)

The output from Infix contains invisible tagging that preserves its meaning:

Copying the output and using it in a input cell produces the same result:

Typing in a visually identical result from scratch will produce a different result:

Wolfram Research (1988), Infix, Wolfram Language function, https://reference.wolfram.com/language/ref/Infix.html.

Text

Wolfram Research (1988), Infix, Wolfram Language function, https://reference.wolfram.com/language/ref/Infix.html.

CMS

Wolfram Language. 1988. "Infix." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Infix.html.

APA

Wolfram Language. (1988). Infix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Infix.html

BibTeX

@misc{reference.wolfram_2024_infix, author="Wolfram Research", title="{Infix}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Infix.html}", note=[Accessed: 24-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_infix, organization={Wolfram Research}, title={Infix}, year={1988}, url={https://reference.wolfram.com/language/ref/Infix.html}, note=[Accessed: 24-December-2024 ]}