Skip to main content

The Expression

This video presents the same text shown beside it, spoken and on screen. It adds nothing the text does not say.

State

An expression is a language construct that evaluates values, built from operators — unary taking one operand, binary two, ternary three — under precedence rules dictating order of operations.

Show

One line computing a discounted price is operators and operands negotiating by rank.

Watch for

Precedence differs at the edges across languages; check the exceptions.