Note: This website is archived. For up-to-date information about D projects and development, please visit

It Compiles

Part of TutorialFundamentals


It doesn't actually do anything, but it compiles and runs.


void main() 

More Information

Each program in D must have a main function somewhere. This program example only contains the main function. A main function may return either void or int, and can accept either no parameters or a single string[] which supplies the command line arguments to the program.

For a fuller explanation of what this means, visit Wiki4D.