3 ms·
The confusing part for beginners is maybe to know were to start the spiral (or right left scheme) in a cast since there is no identifier.
by rightbyte 5y ago
The confusing part for beginners is maybe to know were to start the spiral (or right left scheme) in a cast since there is no identifier.
- bruce343434 5y agoThat's a fair point. In C, you always start at the identifier. In case there is none, type declarations can contain parentheses*, and just like in math, parens resolve first, so it's from innner to outer. So in this case one starts with the `(*)`. * the tricky part is that `()` are also used to denote functions. So yeah, it's not always readable. `(*)()` would be a pointer to a function returning int (the default type) and taking an unspecified amount of arguments.
- steerablesafe 5y agoYeah, because the "spiral-rule" is dumb, it's not a spiral at all. It's just regular operator precedence.