> How much memory should I allocate to a string when converting from a UInt32
> or UInt16 using StrIToA? Should I just hardcode in a certain number of
> bytes or is there a programmatic way of determining how many bytes I should
> allocate?
>
> example:
> static void SomeFunction (Uint32 int; char* str)
> {
> str = MemPtrNew(???);
> StrIToA (str, int);
> .
> .
> .
> }
just create an array locally.. a few bytes isn't going to kill your
stack :) having MemPtrNew() for a small string kinda takes more
code to do than you would save.. and, chances are people forget to
call MemPtrFree() :P
whats the largest number? 16bit - 32767 or 65535, only need 5
characters.. with 32bit.. you'll need a bit more..
// az
[EMAIL PROTECTED]
http://www.ardiri.com/ <--- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/