CBFalconer wrote:
Unknown attributions:
Not using a parameter usually indicates a bug
Not necessarily. You often want to design a procedure or function with a spare parameter to cover future extension, and probably document that it shall be called with that parameter zero. The actual procedure code has no reason (today) to use the parameter.
FWIW, I'm not really a fan of this practice (which I've seen in some places, and occasionally tried myself). For one, unless you actually know what the future extensions will be, it's hard to foresee which type the future parameter should have (and if one is enough actually). In C, you might get away with an integer parameter, since almost everything is an integer in C. ;-) In Pascal, you'd often want a better typed parameter.
Besides, I've found that it's usually not *such* a big deal to adjust callers to a new parameter, or to provide a backward-compatible interface (which possibly just calls the new, extended routine, with the new parameters).
Frank