2 ms·
All these problems could be solved by just having ++ and += not return a value, which gets rid of all the confusing cases but keeps the useful cases.
by bawolff 4y ago
All these problems could be solved by just having ++ and += not return a value, which gets rid of all the confusing cases but keeps the useful cases.
- UncleEntity 4y ago++ is useful to switch over the items of a string: switch (x++) { case ‘+’: if (x == ‘+’) { op = OP_INC; x++; } else if (x == ‘=‘) { op = OP_ADDEQ; x++; } else { op = OP_ADD; } break; … }