C (98/254)

From:Paul Hill
Date:01 Apr 00 at 05:47:52
Subject:Re: ObtainPen for my colors

On 31-Mar-00 17:15:03, Joris Kempen wrote:
>Hello Paul

>>> #define BLACK 0x00000000
>>> #define GRAY (0.5 * 0xfffffffe)
>>> #define WHITE 0xfffffffe
>>
>> Possibly a floating point problem? Try:
>>
>> #define BLACK 0x00000000
>> #define GRAY (0x8fffffff)
>> #define WHITE 0xffffffff

Oops, this should have been 7fffffff...

>Damn this way it does work to get my GRAY :)))
>> or
>>
>> #define GRAY (0xffffffff >> 1)
>>
>This one doesn't. What does shifting 1 right do?

Shifting 1 place to the right divides by 2. Shift 2 places to divide by 4,
3 to 8 etc.. It's fast.



Paul

------------------------------------------------------------------------
LOW RATE, NO WAIT!
Get a NextCard Visa, in 30 seconds! Get rates
as low as 2.9% Intro or 9.9% Fixed APR and no hidden fees.
Apply NOW!
http://click.egroups.com/1/2122/1/_/451227/_/954717520/
------------------------------------------------------------------------