I'll take a stab: If the compiler treats the 20,000 constant as an Int16, when you mutiply by 2 you go over the 2^15 = 32768 limit, which would roll you back around to some negative number. But, if the number is bigger than an Int16 can handle, maybe the compiler treats it as an Int32 or a UInt16 ...
Try casting the 20,000 to a UInt16 or UInt32 MemPtrNew( (UInt32)20,000) * 2); On 1/25/07, Lionscribe <[EMAIL PROTECTED]> wrote: > > Can anyone explain me why the code > MemPtrNew(40000); works fine, > while the code > MemPtrNew(20000*2); fails. > I tried it in many variations (with > large numbers), and it is always the > same. The same happens with > MemHandleNew. > > LionScribe > > > -- > For information on using the PalmSource Developer Forums, or to > unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
