[fpc-pascal] Flush(StdOut) doesn't mean Flush(Output)

Tomas Hajny XHajT03 at mbox.vol.cz
Mon Jul 7 10:25:24 CEST 2008


On Mon, July 7, 2008 09:55, leledumbo wrote:
>
> In the rtl documentation, StdOut is defined as an alias for Output.
> Therefore, (I think) flushing one will also flush the other. But the
> truth,
> it's not. In fact, only Flush(Output) will really flush standard output.
> So,
> what will Flush(StdOut) do?

Obviously, it would flush everything written to StdOut file (which is
normally associated with the same system handle as Output, but treated as
a different file in our RTL).

You are absolutely right that our documentation is not aligned with the
current implementation. The question is, what we really want or need
(either side may be changed). Does anybody see particular benefits of the
current implementation (i.e. having two independent files for each of
stdout system handle and two independent files for stderr)?


> PS: This might apply to StdErr (and StdIn, but I don't find StdIn), too.

It would indeed apply to StdErr and ErrOutput too.

Tomas





More information about the fpc-pascal mailing list