Actually, it's a statement. Or more specifically, an expression
statement.
You're using "this" to refer to the entire line of code, which is an
expression statement. Martin was using "this" to refer to the function
call expression contained in that expression statement, so his
statement was just as accurate as yours. Since the "exception" almost
certainly occurred while the function call was executing, that
function call was probably also what Pranav was incorrectly
describing as a a command when he used the word "this".
...
You got a weird notion of what's "wonderful."
He got a fatal error... how is that "lucky"?
Fatal errors are much better than undetected bugs. They gave him an
opportunity to detect and correct his error before it caused more
serious damage.
It's OK if the compiler gave a warning that contained the word
"exception" (as in the general meaning of "exception"). But if it
"threw" an exception (as in a "program exception"), even at compile
time, then that's not OK.
The behavior of this code is undefined; as far at the standard is
concerned, that would be perfectly acceptable. Anything else is just a
QoI issue.
No. getchar() and getch() don't do the same thing.
That's what he was referring to when he wrote about "non-standard
functionality". There are things you can do using getch(), that you
can't do using standard C code, but none of those things is necessary
to this function.