digitalmars.D.bugs - writef / writefln and stderr
- DYH (4/12) Jul 20 2006 Is that correct behaviour?
- Oskar Linde (7/21) Jul 20 2006 Yes.
- Derek Parnell (8/19) Jul 20 2006 Yes.
- DYH (2/14) Jul 20 2006 Ok guys, thanks for your replays =)
Consider this small sample:import std.stdio; int main(char[][] args) { writefln(stderr, "test"); return 0; }will output something like:Is that correct behaviour? DMD 0.1634164D0test
Jul 20 2006
DYH wrote:Consider this small sample:Yes. writef(ln) prints all of it's arguments to stdout. stdout is a std.c.stdio._iobuf*, i.e. a pointer. What you see is the pointer value being printed. Try fwritef(ln) instead. /Oskarimport std.stdio; int main(char[][] args) { writefln(stderr, "test"); return 0; }will output something like:Is that correct behaviour?4164D0test
Jul 20 2006
On Thu, 20 Jul 2006 23:30:26 +1000, DYH <DYH_member pathlink.com> wrote:Consider this small sample:Yes. If you want to write to stderr, use this instead... import std.cstream; derr.writefln("test"); -- Derek Parnell Melbourne, Australiaimport std.stdio; int main(char[][] args) { writefln(stderr, "test"); return 0; }will output something like:Is that correct behaviour?4164D0test
Jul 20 2006
In article <e9o0hi$2inh$1 digitaldaemon.com>, DYH says...Consider this small sample:Ok guys, thanks for your replays =)import std.stdio; int main(char[][] args) { writefln(stderr, "test"); return 0; }will output something like:Is that correct behaviour? DMD 0.1634164D0test
Jul 20 2006