DMD 1.021 and 2.004 releases

Sean Kelly sean at f4.ca
Wed Sep 5 13:17:32 PDT 2007


BLS wrote:
> Walter Bright schrieb:
>> Mostly bug fixes for CTFE. Added library switches at Tango's request.
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.021.zip
>>
>> http://www.digitalmars.com/d/changelog.html
>> http://ftp.digitalmars.com/dmd.2.004.zip
> 
> 
> Multiple
> 
> Module
> 
> static constructors/destructors allowed.
> 
> Unfortunately I have no idea what a "multiple module constructor" is. A 
> code snippet showing a multi. module constructor in action would help.
> Sorry about my ignorance and thanks in advance.

I thought they were already supported, but here's an example:


     module MyModule;

     static  this() { printf( "ctor A\n" ); }
     static  this() { printf( "ctor B\n" ); }
     static ~this() { printf( "dtor A\n" ); }
     static ~this() { printf( "dtor B\n" ); }


Sean



More information about the Digitalmars-d-announce mailing list