DMD 1.005 release

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Wed Feb 7 11:30:22 PST 2007


BCS wrote:
> Hasan Aljudy wrote:
> 
>>
>> Why is that evil? I think it's actually a great idea. "versions" are a 
>> sort of configuration that determines which code should be compiled 
>> and which code shouldn't. Storing this configuration in a separate 
>> file makes sense to me.
>>
> 
> rename versions.txt to versions.d
> 
> and use
> 
> import versions;
> 
> same effect, less confusion

It doesn't work like that:
-----
urxae at urxae:~/tmp$ cat test.d
import std.stdio;

import test2;

void main() {
     version(Foo)
         writefln("version=Foo");
     else
         writefln("Not version=Foo");
}
urxae at urxae:~/tmp$ cat test2.d
version=Foo;
urxae at urxae:~/tmp$ dmd test.d test2.d -oftest && ./test
gcc test.o test2.o -o test -m32 -lphobos -lpthread -lm -Xlinker 
-L/home/urxae/opt/dmd/lib
Not version=Foo
-----

Version specifications ("version=X" lines) don't get imported.



More information about the Digitalmars-d-announce mailing list