Walter Bright wrote:
Don wrote:
In this case you may have a long function, with only a single instruction right in the middle which needs to be changed.

void foo()
{
    asm
    {
        mov EAX,EAX;
    ... lots more instructions ...
    }
    version (bar) asm
    {
        mov EAX,EAX;
    }
    asm
    {
    ... even more instructions ...
        mov EAX,EAX;
    }
}
Yes, of course, that is what I do. It's ugly, though, especially since you want to _remove_ code for version(bar).
asm {
...
}
version(D_PIC) {} else asm {
...
}
asm {
...
}

Reply via email to