Peter N Lewis wrote:
What possible reason could there be for suppressing it? The only use I can see for such a statement is to discard the return value from a function named ParamCount that has side effects, and that is much more clearly done with: "junk := ParamCount;"
I always wanted the extended syntax
nil := ParamCount;
to get the benefits of being able to throw away the return value with the clarity that you are doing so and without the necessity to create junk variables.
Yes for semantics, no for the syntax.
`nil' is a constant, and it's of pointer type. This assignment would violate both rules (and basically create a completely different thing by the same name). I don't think we should follow the example of some other languages to squeeze out the last bits of unused syntax (usually accompanied by worse error recognition).
What I could imagine is a built-in procedure `Ignore', `IgnoreValue', `Discard' or so which takes one parameter of arbitrary type and does nothing.
Or perhaps (but less preferable IMHO) a type-cast to `Void' (as in C) ...
Do any other compilers have something like that?
Frank