Re: if then else short form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Edwards wrote:
I seem to remember seing someone use a abreaviated form of a
if/them/else of the type that can be used in java.

It was something like

if ( a=b ) ? a=1 ; a=2;

I called it the 'tertiary' syntax which is not correct:

to quote a page I found: "
that the book refers to a "tertiary" operator, instead of a "ternary" operator. Of course, "tertiary" means third. "Ternary" means having three parts and is the correct way to describe the ?: operator. Alternatively, this operator could be described as "trinary".
"



Anybody know what the correct syntax is?

Ben

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux