getting __DIR__ and __TIME__ of compilation?

Jacob Carlborg doob at me.com
Sat Dec 28 05:20:09 PST 2013


On 2013-12-27 21:14, Ravn wrote:

> Eh, it does? :-?
> It prints a relative path when I used writeln(__FILE__), I'm on windows 7.

Hmm, ok. It prints the full path when I run it via my text editor. But 
it prints the relative path when I run it via the command line.

> Tried enum path = dirName(__FILE__), compiles normally, no error from
> the compiler, but it still returns a relative path instead of a fullpath
> in my machine.

Yes, same here, don't know why it didn't compile the first time I tried it.

Perhaps this deserves an enhancement request. I really though __FILE__ 
would give the full path.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list