Thank you for the info. However, I know what the equivalent to sprintf is. What I do not know is the equivalent to sscanf and if there is no equivalent, then how do programmers parse a string?
Also, I am using va_start (typo?) and va_end and the specific error message that I am getting on compile is: Error : the file 'stdarg.h' cannot be opened I have also tried to include StdIOPalm.h instead, but that header can be found, but it says that va_start and va_end have no prototype. Should I be messing around with the access pathes in my debug settings? Didn't think that would be necessary if I haven't messed around with them before. Regards, Dan :-> ----- Original Message ----- From: "Ben Combee" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, October 17, 2002 1:53 AM Subject: Re: C cousins... > 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/ > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
