[m-users.] Coupling stdout and stderr

Volker Wysk <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
Hi!

In C++ (and Haskell, I think) there's a feature which causes stdout to be
flushed before writing something to stderr. I'm not sure how this is called.
This way, the output on both streams occurs in the right order. Arbitrary
streams can be coupled that way.

I've looked through the io library, but couldn't find anything like that.
When you have a lot of output on stdout and then output something on stderr,
the order gets messed up. You have to manually flash stdout before writing
to stderr.

It isn't necessary to do this coupling in the opposite direction, because
stderr isn't buffered.

I'd like to suggest to add such a feature to the io library.

Cheers, 
Volker

_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmQO5PEACgkQ+K4ydFOs
HoUvuQ/9Gyf6LWQwvZFB8Dt5njy2d+uKFopNcl1fgDVB79FiiaJZ28uScXO0gmFe
MhAiQYqbaJDj1aYr31OApbYEw4noGUU9J1SD/F/SplKyHVGVGCgjmOSWRq9fCL8B
gt9vy3fvVHG6hiMpApsUFR3V3hnWgHNyisLal4FKaBDKfGa+hozM/xvMxOrmqru0
40k0LF7AbVBtEs0rlhKv9wZcJXocvbKdaWFPSqTbiopmdmaIwAXr3I3prqzFTi9U
Lhhk96TFA2rZBRFK+AJ6dxF5S4yoIFbuXdBSf3DpbKHkrZNyHTPvtQOVLjo94beH
cdUQF5ayvzNdJK7HLKFQV+lO/L8iJ565HQFzFJHR/qpuIbF4yA5BGQoKRRH24N0F
TZrsjihwUJNyQ/NbYKlKF+84RvHtOZsep1chxY2W0hcrAeeLJvU/P/y5XiJcQaJa
RbT8jeGrdoUr0t3V8/cKO7BEVKf2Anzk/Xs4exKeFPj2JnaE3IcOcsxw56OQs0rc
N1BkOmNveaTdh6XwCKyX6SYBqI+55yaczbCl/cMSwZZeI8XUJlAd+q0mgCXY0+9F
qgL4Tzz1NeJ8KMVwsIio73zxBDuTE7xUF0zg0vt9r0bqwfnUvARepJYY6ozE8YWZ
ZSd5cvOx7ruExGMCjng4NHbRKdmo0NqdTttNViNFMGTEx8+IIR8=
=CuuN
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.