Mail Archives: djgpp/1998/04/29/18:32:41
Bill Currie wrote:
>
> Nate Eldredge wrote:
> > Additional trivia: If using GNU C++, you can say:
> >
> > answer = int1 >? int2;
>
> Isn't that:
>
> answer = int1 ?: int2;
In C, I would write it as:
answer = int1 > int2 ? int1 : int2;
I could not believe what Nate posted, because it looked so incredibly
syntactically obscure. So I tried it with gpp and it worked. I don't
see how it makes the operation any clearer, though. :-)
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| ICQ UIN#: 7406319 | http://www.cs.com/fighteer/ |
| ObJoke: If Bill Gates were a robber, not only would he |
| shoot you, but he'd send you a bill for the bullets. |
---------------------------------------------------------------------
- Raw text -