The OS doesn't support sprintf so you must use StrPrintF. I assume the
#define is to force you to use the supported routine. In fact, the Palm OS
does not support most standard C API calls, so use the Palm version of them.

While it is possible to link in standard C functions, the benefits of using the PalmOS variants are in program speed and program size, since Palm OS provides the code for their variants within the OS. The speed issue is especially true on OS5, as the Palm OS functions are implemented in ARM code.

Hi,
sounds nice. In fact I wouldn't want to use the original C API calls, if the PalmOS functions would be equivalent.
But the StrPrintF-function has just a fraction of the functionality of the original sprintf() call, especially not supporting double to string conversion.
So I'd be confident with lower speed and bigger executables if I get the functionality that I need without needing to write my own double to string conversion (which would be even slower I guess :-)). Fortunatly I got this function from another one, so I don't need to write my own :-)


So my opinion is that everyone should be free to use the C API calls when they want to. On the other hand, there might really be some compatibility problem, because I didn't really have a #define sprintf when I checked for it in my code. As I said elsewhere, very weird behaviour I don't really understand. So I don't want to blame anyone for things that I don't fully understand!

Greetings,
Jan


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

Reply via email to