TYCHO Search

Search documentation

    ↑ ↓ to move · Enter to open · Esc to close

    Appendix C — Operator precedence and associativity

    Normative definition: §4.5. From tightest-binding (1) to loosest (8). Binary levels are left-associative; prefix levels are right-associative.

    PrecedenceOperatorsKindAssociativity
    1[] (index/slice) · . (field / tuple index) · (call) · or_return · ...postfixleft
    2- · & (address-of) · ~unary prefixright
    3* · / · % · << · >> · & (bitwise)binaryleft
    4+ · - · `\ · ^`binaryleft
    5isbinary, non-associative—
    6== · != · < · > · <= · >= · inbinaryleft
    7notunary prefixright
    8andbinaryleft
    9orbinaryleft

    Notes: