Dprogramming.com - The D Programming Language [archived content]
Directory

Home
News
Wiki
Entice Designer
DCode editor
Linkdef
bintod
Tutorial
D FAQ
Code
    bintod
    DFL GUI
    D irclib IRC
    fileprompt
    ini files
    Linkdef
    list linked list
    mtext
    Splat sockets
    trayicon
    wildcard
Contact
Paste
Links

Tutorials

On this page you will find tutorials for the D programming language. Here you can learn how to use D and start creating command line and/or graphical programs.

Installing the Compiler

The popular D compilers are DMD, GDC and gdcmac.

Here is a good video tutorial for installing the D compiler DMD on Windows and getting started with a proper working D environment, along with other good video tutorials.
Some extra information:
It is generally a good idea to extract the dm and dmd directories into the root C:\ (or other drive) as this is where it is installed for most users.
When adding to the environment variables, the top section lists variables local to your user account, and the below ones are for everyone using the computer. You can add to either section; if "Path" is not listed in the top section, you can add it yourself.
Also when adding to the environment variables, be sure to add both the dm\bin (dmc) and dmd\bin (dmd), separated by semicolons, such as: others;c:\dm\bin;c:\dmd\bin
You do not need to restart your computer to use the dmd command, you only need to open a new command prompt console.

Here is the D language specification and standard library (Phobos) documentation.

Tango is an alternative to the D standard library.
Tango is a cross-platform open-source software library, written in the D programming language for D programmers. It is structured as a cohesive and comprehensive library for general purpose usage, and is supported by a growing number of recognized D enthusiasts.
Pros: actively maintained by very intelligent D programmers. Robust and fully-featured library. New Tango book being released on Amazon.
Cons: not the "standard" D library: existing code may not work with Tango as it may instead use the standard library "Phobos". Separate setup step. Not a final release and has API changes.

GUI: Dialogs/Windows, Widgets/Controls

A list of GUI libraries can be found here.

DFL is the GUI library created by dprogramming.com, and its companion program Entice Designer.

Here are DFL tutorials.
Here is a new DFL video tutorial for getting started with DFL and Entice.

New D Users

New to D? Not sure how to get started? The official D site can be found over at Digital Mars D, where you can find the DMD compiler, D language specification, standard library (Phobos) documentation, and more.

For tutorials and beginner help, you can check out the D specification, Phobos documentation, dsource.org tutorials, and the many pages of the D wiki. Your compiler download should also come with a samples directory with example source code. Some existing D code may fail to compile as it may be for D 1.0, or may have been written while D 2.0 was still evolving; be sure to verify versions.

If you're out for some D source code and libraries, check out the fine selection here at dprogramming.com using the left menu, there's a lot of projects hosted on dsource.org, and the D wiki has library and GUI library lists. You can also browse the standard library source code; it's open source and comes with your compiler download.

Other Tutorials

Below are older tutorials that still may be helpful.

Beginner tutorial
  • Modules
  • Statements
  • Comments (3 types)
  • Import
  • Functions (brief)
  • stdio (module)
  • main function

    Beginner continued
  • Identifiers (names)
  • Variables
  • Constants (const)

    Functions
  • Example
  • Description

    Intermediate tutorials
  • Area of a circle commented code by T. McKeaveney.
  • File tutorial commented code by Rick Strahl.

  • Copyright © 2004-2008 Christopher E. Miller