View Single Post
  #1   Spotlight this post!  
Unread 02-04-2004, 22:48
NotQuiteFree's Avatar
NotQuiteFree NotQuiteFree is offline
Do the WAAAAVE!!
#0957 (Watson)
Team Role: Programmer
 
Join Date: Dec 2003
Location: Albany, Oregon
Posts: 22
NotQuiteFree will become famous soon enough
Send a message via MSN to NotQuiteFree
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)
__________________
Yo.