Compile time function execution...
Walter Bright
newshound at digitalmars.com
Thu Feb 15 21:58:05 PST 2007
Derek Parnell wrote:
> So this would mean that I could code ...
>
> mixin(
> Conv("moveto 34,56 "
> "drawto +100,-50 "
> "drawto +0,+100 "
> "pencolor red "
> "drawto -100,-50 "
> );
> );
>
> And expect that the Conv function will, at compile time, create the
> equivalent D code to implement the 2D drawn item for the target platform,
> and have the mixin insert it into the program being compiled.
Exactamundo!
More information about the Digitalmars-d
mailing list