A very simple program, Hello, world1. download d-mode.elhttp: // prowiki.org/wiki4d/wiki.cgi? Put EditorSupport/EmacsDMode2. in your own directory, such as my/opt/emacs_plugins directory, and then in. configure the following in the emacs file: (load-file (expand-file-name "/opt/emacs_p
A very simple program, Hello, world
1. Download d-mode.el
Http://prowiki.org/wiki4d/wiki.cgi? EditorSupport/EmacsDMode
2. Put it in your own directory, such as my/opt/emacs_plugins directory,
Configure the following in the. emacs file:
(Load-file (expand-file-name "/opt/emacs_plugins/d-mode.el "))
Emacs needs to be restarted
3. Download the installation package under Ubuntu
Http://dlang.org/download.html
Double-click to install.
4. Create the hello. d file in emacs
The Code is as follows:
[Plain]
- Module hello;
- Import std. stdio;
- Void main ()
- {
- Writefln ("Hello, world! ");
- }
We can see that the advantages of the language after Java, such as module and import.
If the previous d-mode.el takes effect, you should be able to highlight and format the syntax.
5. Compile in shell
Dmd hello. d
Then run the generated hello program and output:
Hello, world!
My first D program was born.
No nonsense. It should look easy.