D_Version2 problem
Stewart Gordon
smjg_1998 at yahoo.com
Sun Jan 18 14:22:05 PST 2009
Hoenir wrote:
> The D_Version2 version identifier doesn't work properly for me.
> Tried compiling with dmd 1.039. D_Version2 is set even if I pass -v1 to it.
>
> Is this a bug
Works for me, as this code demonstrates:
----------
import std.stdio;
void main() {
version (D_Version2) {
writefln("D2");
} else {
writefln("D1");
}
}
----------
> or am I doing something wrong?
Possibly:
- Inadvertently running the D2 compiler when you intended to run the D1
compiler
- Misunderstanding how conditional compilation in D works
....
Stewart.
More information about the Digitalmars-d-learn
mailing list