Confusion over version (xxx)

Ken Barry kb9888 at gmail.com
Fri Aug 15 09:31:36 PDT 2008


Lars Ivar Igesund Wrote:

> Behaviour in D changed at some point, so if you see examples/code that don't
> work, it is just too old.
> 
> version (foo) {
> extern(something):
> }
> 
> will only be applied to that version block, and so it won't apply to the
> symbols following below the version blocks. Either duplicate all symbols in
> each version block, or use
> 
> extern (System):
>  
> symbols ...
> 
> System will then put in the correct extern depending on platform.
> 
> -- 
> Lars Ivar Igesund
> blog at http://larsivi.net
> DSource, #d.tango & #D: larsivi
> Dancing the Tango

Thanks Lars, extern (System): works just fine :)




More information about the Digitalmars-d-learn mailing list