That's reasonable. But, aside from the improper cast, I assume the code seems decent.
"Jim Schram" <[EMAIL PROTECTED]> wrote in message news:82284@palm-dev-forum... > > At 1:14 PM -0800 2002/04/01, Mark Biek wrote: > >Any particular reason why you don't like this? I've used it in a number of > >different situations without issue. > > Because if the size of Int is defined as a 16-bit integer (instead of a 32-bit or 64-bit integer) the cast truncates the upper bytes of the pointer, resulting in an invalid address. It's rarely necessary to cast pointers to integers when performing arithmetic on them. The end result is more portable source code which compiles and functions correctly using a variety of different compilers and operating systems. > > Regards, > > Jim Schram > PalmSource Inc. > Partner Engineering > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
