At 01:19 2002-10-17 -0400, you wrote: >Hi there everyone. First time post for me here, so if I am in the wrong >place, someone please tell me. > >Anyway, I would like to know what the Palm cousins are for sscanf(), >va_start(), and va_end(). I found va_list, and sprintf(), but I cannot find >info on these other functions. If there are no direct cousins, how do >programmers perform the tasks that these basic C functions normally provide? >I need to parse a string. It should be as easy as just an sscanf() function >call.
vs_start, va_end, and va_list are defined by the compiler... your tool set should have come with a stdarg.h header file. For CodeWarrior, its part of the MSL library. This defines how the compiler handles variable argument lists. The Palm OS rough equivalent for sprintf is StrPrintF. It handles most of the formatting arguments that the standard sprintf handles, with the exception of floating point. If you are formulating something that uses variable arguments and would normally call vsprintf, you would use StrVPrintF. >BTW, in all of the docs I've come across, va_start, va_end, and va_list are >used. However, va_list did not work in my code. I found out that I needed >to change this to _Palm_va_list instead. Perhaps the va_start and va_end >issues are related, but again, I cannot find them in the docs I've looked in >already. Remember, the Palm OS API deals with Palm OS functions... some things are compiler specific, but fortunately, the two most common C/C++ compilers on Palm OS, CodeWarrior for Palm OS and prc-tools, agree on the actual mechanics of a va_args list, although they may use slightly different macros. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
