Is there a way to define a compile time constant/enum with dmd? For example, inserting the svn revision number into my code? In C...
#include <stdio.h> #ifndef SOMETHING #define SOMETHING "bar" #endif int main() { printf("hello world: " SOMETHING " \n"); return 0; }
gcc main.c && ./a.out
hello world: bar
gcc -DSOMETHING=\"foo\" main.c && ./a.out
hello world: foo How would you recommend I do something like this with D?