3 ms·
The ternary is an expression, not a statement :) You can write: a = b ? c : d; in C/C++, you can't write a = if(b) { c; } else { d; }.
by jeremiep 14y ago
The ternary is an expression, not a statement :)
You can write: a = b ? c : d; in C/C++, you can't write a = if(b) { c; } else { d; }.
- tarabukka 14y agoOh, yeah. My mistake. Although what you describe is a lot more functional in style. You could probably emulate it in a language with higher-order functions.