I must say I was rather pleased with myself at having worked out the correct answer before reading this post (and another) with the correct answer in. Of course if anybody actually implemented this in production code they would be told off. Reminds me of the pointer trickery fun we used to do in C "for performance reasons" :)
Hal Angseesing
Posts
-
no iterations -
Funny stringsVS has a warning (C4837) for this as well - by default (pre vs2010) was off by default. We have (as part of our standard headers that apply to all compile units) a set of warnings we always turn on (and some we turn off). Somebody had slipped that one in a while back :)
-
Variation of bad boolean check.I have to disagree. Amongst beginners tertiary operators are notoriously hard to read. Anybody who adds them superflously does deserve the hall of shame.
-
It always worked well before so leave it like that... [modified]I had to stare at that for a good 30 seconds before I spotted the bug. Gosh - I need a decent compiler at this time in the morning to help me!
-
Using Else with blank IfYep, done this myself. And debugger conditional breakpoints are actually quite a lot slower than IP traps.
-
Nice catch!arc_10spd wrote:
I have always thought the Dutch speak the best English in Europe
What better than the British? Yeah, you may have a point - have you heard some of our dialects! :-D
-
We always use "i" as a loop counter......so lets make it global. This was the answer of a "Technical Consultant" that I worked with many years ago. All of his loops were for i = 1 to 10 next i. This was VB 3 - so some time ago! To save himself the effort of dim i as integer at the beginning of every function he wanted to use "i" he just made it a global. I can't blame him too much - he was a COBOL programmer who had made the leap to VB. It made for some surprisingly subtle bugs! Needless to say that I removed it after having to try quite hard to show him the benefits (I was a junior C++ programmer at the time).