On Sun, 20 Jan 2002, Keith Rollin 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.
heh - you know your a geek when you start thinking in hex :) the best
solution would be to force the integeter 2 into the desired type
... = (UInt32)2 << 18; or
... = 2UL << 18;
problem solvered. (old paint commercial in australia)
// az
[EMAIL PROTECTED]
http://www.ardiri.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/