CBFalconer wrote:
This includes the use of extensions in Standard mode. Unused parameters would probably be an exception to this generality. Unused function return values should be handled by assignment to a specific junk variable, and should be very rare. Many C foulups are due to ignoring error returns from functions, so making this hard to do in Pascal is a GOOD THING.
Fortunately, most I/O errors (e.g.) in Pascal are not signaled via function results in the first place.
Apart from that, we could discuss what's "hard" enough. I'm content if it's explicit -- either at function declaration time (when the function's implementer knows that this result can be harmlessly ignored), or at call time for other cases. As others have pointed out, assignment to a junk variable might fail (i.e., still produce warnings) with better optimization, so writing `Discard (MyFunc (...))' there seems preferable.
Frank