|
|
|
![]() |
|
|||||||
|
||||||||
| View Poll Results: Do you use Ternary Operators in your code? | |||
| Yes |
|
17 | 60.71% |
| No |
|
11 | 39.29% |
| Voters: 28. You may not vote on this poll | |||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Do you use ternary operators in your code?
Did anyone use Ternary operators in their code this year? Personally, I find them a little bit...odd. I figure using an if-then statement that says:
if(y > 5) x = 1; is easier to read and understand, than: x = ((y > 5) ? 1 : 0); But, that is just one man's opinion. What do you all think? For some more info on Ternary Operators, Binary Operators, and Unary Operators, see http://cplus.about.com/library/gloss...ryoperator.htm (This is where I got the example) |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is your most prefered programming language? | Hailfire | Programming | 156 | 19-01-2005 21:42 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| Interrupt timer, executing code asap? | SeanCassidy | Programming | 10 | 07-03-2004 01:47 |
| Inserting Naviagation code into Default code? | actorindp | Programming | 3 | 28-01-2004 18:12 |
| Does your team use the Default code. | Jeff McCune | General Forum | 2 | 09-01-2003 14:46 |