Howdy Vad,
As the recent recipient of the "Famous Error" award I am now overly sensitive to the issue of compiler errors and questions...
I just wanted to make one point -- on the real exam, we NEVER say "A compiler error on line [whatever]." We always say, "Code will not compile BECAUSE of an error on line [whatever]." Because we cannot guarantee exactly what a particular compiler implementation will actually *report* as the error. For example, if you leave off a curly brace, you know that this produces a compiler error. But WHERE the compiler actually reports the error (and even *what* the compiler reports) might be different from one compiler to another. So, the questions can't ask you exactly what a particular compiler error will be, or even what line the compiler will report (which is why we don't say, "A compiler error on line ..." But instead, the questions ask in which line of code the *actual* error occurred.
So... I just want to make sure that everyone knows how the real exam questions are worded, and why we chose to use that wording. In our "famous error", we didn't specify at which line the compiler errored, we were wrong about the place in the code where the error happened that *caused* the compiler error... it could have been on one of TWO lines, and we were acknowledging only *one* of the two lines of code in which the real error could be.
But after all that, it's quite cool that you're posting questions. There aren't enough of them floating around, and we imagine that everyone is probably getting a little tired of the ones from our book!
Cheers,
Kathy
