2 ms·
Actually, I can think of some more: - "goto case" and "goto default" - Using ?: with nothing in between, like GNU C does. This is a feature I often use.
by zzo38computer 6y ago
Actually, I can think of some more:
- "goto case" and "goto default"
- Using ?: with nothing in between, like GNU C does. This is a feature I often use.
- marcodiego 6y agoCan you explain how these goto extensions would work?
- zzo38computer 6y agoOK. This goto case extension would be, if you write "goto default" inside of a switch block, then it go to the default label, and if you write "goto case" and an expression, it evaluate the expression and go to the case label that matches the result, or to default if there isn't a match. The ?: with nothing in between is documented in the GNU documentation, although I can also explain here: If whatever is before the question mark is true then that value is used (without evaluating it twice); if false, then instead whatever is after the colon will be used.