lua-users home
lua-l archive

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


> GCC C has ?:
> 
> 	z = x?:y;
> 
> It's just a hack on the ternary operator, but behaves precisely the same
> way
> in that x will only be evaluated once. GCC has supported this since at
> least
> 2.95, circa 1999.

BTW: this has been proposed for standardization in C++:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf

- Jörg