"BartC" <> writes:
> "Keith Thompson" <kst-> wrote in message
> news:...
>> "BGB / cr88192" <> writes:
>> [...]
>>> but, then again, some compilers will warn about unused local variables,
>>> which is personally a bit annoying.
>
>> You find warnings about unused local variable annoying? Why?
>> Is there any reason to declare a variable if you're not going to
>> use it?
>
> Where code is incomplete, or in development, declarations can exist but not
> the statements that use them (or they might be commented out temporarily).
>
> For example, if I've just written a complicated set of declarations, I might
> compile to check for errors, before I've written any actual code.
>
> This sort of warning is useful when development has finished.
Or during maintenance, which typically continues long after development
has "finished".
Personally, I want to be warned about unused variables unless I
ask not to be. Most compilers let you disable specific warnings.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"