in reply to Ternary operator (there's no Trinary operator )
From The Camel (Programming Perl (Third edition): section 3.16. Conditional Operator):
As in C, ?: is the only trinary operator.
The Camel also comments in the introduction to Chapter 3:
Perl operators come in three arities: unary, binary, and trinary (or ternary, if your native tongue is Shibboleth).
Update: in light of some later replies to the OP perhaps I should note that as Perl has only one terniary/trinary operator, and given The Camel's use of 'trinary', it is reasonable in the context of Perl to refer to the conditional operator ?: as 'the trinary operator'. This may not be "correct" in a wider sense, but is certinally fitting in a Perl context. :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Ternary operator (there's no Trinary operator )
by grinder (Bishop) on Jul 19, 2006 at 08:56 UTC | |
by ikegami (Patriarch) on Jul 19, 2006 at 14:49 UTC | |
Re^2: Ternary operator (there's no Trinary operator )
by davido (Cardinal) on Jul 19, 2006 at 07:19 UTC | |
by GrandFather (Saint) on Jul 19, 2006 at 07:41 UTC | |
by graq (Curate) on Jul 19, 2006 at 14:24 UTC | |
by ysth (Canon) on Jul 19, 2006 at 20:24 UTC | |
Re^2: Ternary operator (there's no Trinary operator )
by swampyankee (Parson) on Jul 19, 2006 at 17:47 UTC |