On Tue 2008-11-25 09:48:24 UTC-0700, Tyler Littlefield ([EMAIL PROTECTED]) 
wrote:

> I've got a line of code that reads:
> str=i==1?"is"||"are";
> the compiler is choking; ideas would be great, not sure what I"m messing up.

I think you mean the ternary operator:

  str = i == 1 ? "is" : "are";

This is equivalent to:

  if (i == 1)
    str = "is";
  else
    str = "are";

http://en.wikipedia.org/wiki/%3F:

http://en.wikipedia.org/wiki/Ternary_operation

Reply via email to