IT lexicon › Programming › Infix notation

Infix notation

Programming På svenska → Updated: 2026-11-12

Notation system where operators appear *between* operands, as in ordinary math: 3 + 4 instead of + 3 4.

Infix notation is nearly universal in modern programming—it's how people naturally write mathematics. Fortran, ALGOL, and C all use infix for arithmetic and logic. However, this requires the parser to understand operator precedence to avoid ambiguity. For example, 2 + 3 * 4 must be parsed as 2 + (3 * 4) = 14, not (2 + 3) * 4 = 20. Languages like APL and Lisp use alternative notations—APL is strictly right-associative, Lisp uses prefix. Infix notation is ergonomic for human reading but requires more complex parsing than simpler alternatives.

← Back to the lexicon