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 -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html NEW! GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8