- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I can't believe you nutters are all argument over operator semantics and language flamewar garbage.
Nobody actually makes the = vs. == mistake more than once or twice in practice -- I think I made it once, and the compiler caught it for me; that was many years ago.
But if it bothers you that much, the solution is simple. Just program in a strict functional language where assignments are simply not allowed. You're welcome.
Admin
"arguing", not "argument", sorry
Admin
Um, am i missing something or did everyone in this thread completely overlook the last paragraph?
"While Hannes wasn't able to provide any insight into the purpose of that IF statement, he did notice out that iStart is always twenty and iOffset is always a multiple of twenty. But it wasn't until his coworker replied "oooh, well that makes sense, then" that he realized how much he had truly lucked out."
The fact that iStart is always twenty and iOffset is always a multiple of twenty means that the comparison really is worthless because no non-integer would ever be returned ;)
Admin