From 675e312f25a9c9e3d09468bcf1e96e66188e7713 Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 14 Feb 2009 19:47:06 +0000 Subject: [PATCH] added d/init D example git-svn-id: svn://anubis/misc/d@87 bd8a9e45-a331-0410-811e-c64571078777 --- init/Makefile | 12 ++++++++++++ init/init.d | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 init/Makefile create mode 100644 init/init.d diff --git a/init/Makefile b/init/Makefile new file mode 100644 index 0000000..3b8cd66 --- /dev/null +++ b/init/Makefile @@ -0,0 +1,12 @@ + +TARGET := init + +all: $(TARGET) + +$(TARGET): $(TARGET).d + +%: %.d + gdc -o $@ $< + +clean: + -rm -f *.o *~ $(TARGET) diff --git a/init/init.d b/init/init.d new file mode 100644 index 0000000..b47b7a9 --- /dev/null +++ b/init/init.d @@ -0,0 +1,11 @@ + +import std.stdio; + +int magicNumber = 42; +char[] password = "sesame"; + +void main() +{ + writefln("Magic number: ", magicNumber); + writefln("Password: ", password); +}