added d/init D example

git-svn-id: svn://anubis/misc/d@87 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh 2009-02-14 19:47:06 +00:00
parent 26b464df2f
commit 675e312f25
2 changed files with 23 additions and 0 deletions

12
init/Makefile Normal file
View File

@ -0,0 +1,12 @@
TARGET := init
all: $(TARGET)
$(TARGET): $(TARGET).d
%: %.d
gdc -o $@ $<
clean:
-rm -f *.o *~ $(TARGET)

11
init/init.d Normal file
View File

@ -0,0 +1,11 @@
import std.stdio;
int magicNumber = 42;
char[] password = "sesame";
void main()
{
writefln("Magic number: ", magicNumber);
writefln("Password: ", password);
}