4 ms·
The modern notation contains a very similar 'ambiguity'. Compare: x---y, x-- - y, and x - --y.
by moonchild 5y ago
The modern notation contains a very similar 'ambiguity'. Compare: x---y, x-- - y, and x - --y.
- mburee 5y agoAnd sadly x-----y won't parse :(
- krylon 5y agoIt's been a while I used C, but I for one am kind of glad that doesn't parse. If you need to do this, you can use parentheses: x - (--y) or (x--) - y
- tom_ 5y agoAll parse fine, and unambiguously, due to the maximal munch rule. x---y is (x--)-y, which is semantically valid. x-----y is ((x--)--)-y - but it's a semantic error, as x-- is not an lvalue.