DMD versions

Matthias Pleh sufu at alter.com
Fri Feb 18 04:56:46 PST 2011


Am 18.02.2011 13:51, schrieb Steven Schveighoffer:
> On Fri, 18 Feb 2011 07:36:18 -0500, Russel Winder <russel at 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


More information about the Digitalmars-d mailing list