I wrote:
`--enable-implicit-result' (to be more explicit ;-).
Actually I now prefer `--[no]-implicit-result'. This is more in line with the other positive/negative options.
I've implemented it now, and it fixes the cases discussed. It's on in `--delphi', off otherwise. (Or what about Mac Pascal, should it be on there?)
But there's another problem. Does Delphi allow redeclaration of `Result' within the same function? (I hope not -- then we'll only have to change the test program.)
Program RetVal;
function K: Char; var Result: array [1 .. 7] of Char; begin Result := '....K..'; K := Result[5] end;
begin WriteLn (K) end.
Frank