This commit is contained in:
Josh Holtrop 2013-02-16 16:33:40 -05:00
parent a80d95a714
commit 865caaf37d
3 changed files with 35 additions and 0 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ import/import
compclass/compclass
copy/copy
structcons/structcons
enum/enum

12
enum/Makefile Normal file
View File

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

22
enum/enum.d Normal file
View File

@ -0,0 +1,22 @@
import std.stdio;
enum
{
N1,
N2,
N3
}
enum E
{
E1,
E2,
E3
}
void main(string[] args)
{
writefln("%s, %s, %s", N1, N2, N3);
writefln("%s, %s, %s", E.E1, E.E2, E.E3);
}