Re: copy-bit macro

Regis Duchesne (regis@via.ecp.fr)
Tue, 9 Dec 1997 19:01:16 +0100 (CET)


> > output |= ((input / INPUT_FLAG_FOO) & 1) * OUTPUT_FLAG_FOO;
> > output |= ((input / INPUT_FLAG_BAR) & 1) * OUTPUT_FLAG_BAR;
> > output |= ((input / INPUT_FLAG_BAZ) & 1) * OUTPUT_FLAG_BAZ;

> I think it is better to write:
> output |= input (INPUT_FLAG_FOO | INPUT_FLAG_BAR | INPUT_FLAG_BAZ);
It is not better : it does not the same thing.

Regis "HPReg" Duchesne - Engineering Student at ***** ******** *****
www http://www.via.ecp.fr/~regis/
(O o) I use Linux & 3Com (1135 KB/s over 10Mb/s ethernet)
--.oOO--(_)--OOo.-----------------------------------------------------------