mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-17 09:19:03 +02:00
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
This commit is contained in:
17
tango/example/console/buffered.d
Normal file
17
tango/example/console/buffered.d
Normal file
@@ -0,0 +1,17 @@
|
||||
private import tango.stdc.stdio;
|
||||
|
||||
private import tango.io.Console;
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Demonstrates buffered output. Console output (and Stdout etc) is
|
||||
buffered, requiring a flush or newline to render on the console.
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
void main (char[][] args)
|
||||
{
|
||||
Cout ("how now ");
|
||||
printf ("printf\n");
|
||||
Cout ("brown cow").newline;
|
||||
}
|
||||
21
tango/example/console/hello.d
Normal file
21
tango/example/console/hello.d
Normal file
@@ -0,0 +1,21 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Hello World using tango.io
|
||||
|
||||
This illustrates bare console output, with no fancy formatting.
|
||||
|
||||
Console I/O in Tango is UTF-8 across both linux and Win32. The
|
||||
conversion between various unicode representations is handled
|
||||
by higher level constructs, such as Stdout and Stderr
|
||||
|
||||
Note that Cerr is tied to the console error output, and Cin is
|
||||
tied to the console input.
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
import tango.io.Console;
|
||||
|
||||
void main()
|
||||
{
|
||||
Cout ("hello, sweetheart \u263a").newline;
|
||||
}
|
||||
14
tango/example/console/stdout.d
Normal file
14
tango/example/console/stdout.d
Normal file
@@ -0,0 +1,14 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Illustrates the basic console formatting. This is different than
|
||||
the use of tango.io.Console, in that Stdout supports a variety of
|
||||
printf-style formatting, and has unicode-conversion support
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
private import tango.io.Stdout;
|
||||
|
||||
void main()
|
||||
{
|
||||
Stdout ("hello, sweetheart \u263a").newline;
|
||||
}
|
||||
Reference in New Issue
Block a user