DLang Spec rewrite (?)

Borden 2013 at bordenrhodes.com
Sat May 25 21:59:50 PDT 2013


On Sunday, 26 May 2013 at 04:57:12 UTC, Borden wrote:
> On Sunday, 26 May 2013 at 04:30:46 UTC, Walter Bright wrote:
>> Again, this is deliberate. Macros are set up so that the last 
>> one overrides all the previous ones, enabling a hierarchy of 
>> them using ddoc files. It's a simple form of 'inheritance'.
>
> And perhaps this point could be clarified (and, when I next 
> attack the source I'll test it). I have one.ddoc two.ddoc and 
> src.dd. In src.dd, I use $(MY_MACRO x). one.ddoc has the line 
> MY_MACRO=<p>Called one on $1</p>; two.ddoc has the line 
> MY_MACRO=<p>Called two on $1</p>.
>
> So, I now run dmd -o- -D one.ddoc two.ddoc src.dd. What does 
> src.html say?

and by $1 I mean, of course, $0.


More information about the Digitalmars-d mailing list