The difference between tertiary and triple?

As I understand it, a conditional operator (the condition "consequence: alternative") is often referred to as a "tertiary operator" and "ternary operator".

What is the difference between these terms?

+5
source share
8 answers

It should be called a "conditional statement". "Ternary operator" means that it takes three operands. Since this is the only general operator that does this, it is sometimes called the “triple” operator. The fact that there is only one thing is a coincidence. The tertiary operator is even more erroneous. This means something like "the third most important operator."

+12

- 65 1,8 .

, , "" " " - , , , , , . , , "", "" "".

+10

" " - . , , .

"". " ", , .

+8

"" , "". , .

+6

, .

" []", " ". - , .

, (1 ? 2 : 3;), .

+4

. Ternary , ( ). Tertiary third .

+2

Wikipedia:

( ) , .

I have never heard it called a "tertiary operator." So the difference is that one of them will make you look like a newbie. I think so.

+1
source

one is right and one is wrong

a ternary operator is an operator with three inputs, for example,? b: c, he's arity of 3

Will a tertiary operator mean only the third operator? it does not matter

+1
source

All Articles