Note: This website is archived. For up-to-date information about D projects and development, please visit
Version 2 (modified by csauls, 13 years ago)
Updated to use writef.

Do Something

Part of TutorialFundamentals


It's an abbreviated "hello world" without the world.


import std.stdio;

void main()


Prints "Hello" at the command line.

More Information

The writef function is the standard way to send simple or formatted text to the console. In this example, the quoted phrase is simply printed as-is. The import statement will include symbols from the std.stdio module. Luckily, all modules in the std package are part of the standard library and are automatically linked by the compiler, so you don't have to include them in your command line.

More information on writef and the std.stdio module can be found at the Phobos documentation.


Posted by csauls
Date/Time Mon Jan 02, 2006 03:52 am