digitalmars.D - standard input/output
- Valéry Croizier (1/1) Oct 10 2004 What are the names of the standard input/output files or streams ?
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/36) Oct 10 2004 Funny, I wasn't enable to find that information either.
What are the names of the standard input/output files or streams ?
Oct 10 2004
Valéry Croizier wrote:What are the names of the standard input/output files or streams ?Funny, I wasn't enable to find that information either. They are called stdin and stdout. So easy it is hard... --anders PS. Here is a useful sample program I wrote:/* * Escape ISO-Latin-1 characters as * Unicode \uXXXX escapes, in ASCII * * written by Anders F Bj\u00f6rklund :-) * (C) 2004 afb. All rights reserved. * */ import std.stream; void main(char[][] args) { try { ubyte b; while(1) { stdin.read(b); if (b >= 0x00 && b <= 0x7f) stdout.write(b); else stdout.writef("\\u00%2x", b); } } catch (ReadException ex) { } }Great for editors that don't understand UTF-8...
Oct 10 2004