> That example does not look like you are aware that == has higher precedence than &.
Sorry, but what language did you think I was using? Given that I used "and" and did not include () around the condition of the 'if', it certainly wasn't C. (It is missing a ':' at the end - sorry about that).
Much as I like C, it clearly got some precedence issues wrong. More modern languages do a much better job.
Posted Dec 7, 2012 7:21 UTC (Fri) by mathstuf (subscriber, #69389)
[Link]
To be fair, there is a define for 'and' to '&&' in commonly included C headers (I forget which exactly). And since there's LISP floating around, parentheses sort of fade into the background after enough programming in it, so the error(s) made aren't completely obvious. The colon probably would have helped :) .
C alternative tokens
Posted Dec 7, 2012 16:42 UTC (Fri) by dtlin (✭ supporter ✭, #36537)
[Link]