early 15c., from Late Latin ternarius "consisting of three," from terni "three by three," from ter "thrice," which is related to tres "three" (see three).
ternary ter·na·ry (tûr'nə-rē)
adj.
Composed of three or arranged in threes, as a chemical compound containing three elements. n.
A group of three.
programming
A description of an operator taking three arguments. The only common example is C's ?: operator which is used in the form "CONDITION ? EXP1 : EXP2" and returns EXP1 if CONDITION is true else EXP2. Haskell has a similar "if CONDITION then EXP1 else EXP2" operator.
See also unary, binary.
(1998-07-29)