Compilation error when using a extern function ?

tsalm tsalm at free.fr
Fri Nov 21 13:37:48 PST 2008


Le Fri, 21 Nov 2008 00:34:03 +0100, Denis Koroskin <2korden at gmail.com> a  
écrit:

> union ColorProxy {
>    uint color;
>    struct {
>        ubyte red;
>        ubyte green;
>        ubyte blue;
>        ubyte alpha;
>    }
> }
>  ColorProxy proxy;
> proxy.color = ColorValues.Aqua;
> return Color(proxy.red, proxy.green, proxy.blue, proxy.alpha);

Yes it's a better way.
Thanks.


More information about the Digitalmars-d-learn mailing list