Am 18.02.2011 13:51, schrieb Steven Schveighoffer:
On Fri, 18 Feb 2011 07:36:18 -0500, Russel Winder <rus...@russel.org.uk>
wrote:
What is the official way of programmatically determining the version
number of the currently executing dmd?
Thanks.
AFAIK, there isn't a way. You can only determine D2 vs D1.
It would be a good feature to add to druntime though. Since druntime is
inextricably linked with dmd, you could define an enum with the minor
version.
I remember Tango does this.
-Steve
There is the special Token __VERSION__ which gives an integer.
http://www.digitalmars.com/d/2.0/lex.html
greets
Matthias