At 2:03 AM +0100 1/21/02, Aaron Ardiri wrote:
>  > > >     const UInt32 test_2_18 = (2<<18);
>
>   ... = 2L << 18;
>
>   but, since it is a constant, why not just hardcode it without the shift?

Because sometimes it's easier to see and understand what's going on, 
rather than having just:

        const UInt32 test_2_18 = 0x00080000;

Besides, we may be just seeing a pared down example.  The original 
code may have been:

        UInt32 fred = 2 << some_shift_count;

where "some_shift_count" happened to be greater than 15.
-- 

-- Keith Rollin
-- Palm OS Emulator engineer

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to