2 ms·
It's pretty strange nonetheless that it compiles at all. Underlying it is that a switch statement isn't a proper control structure but syntax sugar for goto.
by podperson 14y ago
It's pretty strange nonetheless that it compiles at all. Underlying it is that a switch statement isn't a proper control structure but syntax sugar for goto.
- smsm42 14y agowhile() loops are really syntax sugar for goto too. And whole C is arguably just a syntax sugar for assembler :) That's why we use it.
- podperson 14y agoThey're not syntax sugar for goto the way switch is though. You can't pull stunts like that with two intermingled while loops because a while loop operates on a single block.