How to insert code in place with templates/mixins?
rempas
rempas at tutanota.com
Mon Dec 20 18:06:32 UTC 2021
On Monday, 20 December 2021 at 11:58:58 UTC, Tejas wrote:
>
> Ehh, it still fails; should've explicitly put the length of the
> array and the `extern (C)` in `main`
>
> ```d
> module demo;
>
> [ ... ]
>
> extern(C) /+added this because you used -betterC+/ void main() {
>
> while (true) {
> mixin(add_char!'%');
> mixin(add_char!'$');
> }
> }
> ```
Thanks! A mixin is not necessary, it will do the same thing
without it.
More information about the Digitalmars-d-learn
mailing list