Hi All,

I have a large code model, multi-segmented,  C++ application in Codewarrior
6 (all patches applied).
I have written a string class that provides a method that eventaully calls
down to ::StrPrintF().

I have defined the method as follows: -

class String
{
    void Format(char* strFormat, ...);
}

The method body looks something like: -

#if EMULATION_LEVEL == EMULATION_NONE
 #include <unix_stdarg.h>
#else
 #include <stdarg.h>
#endif

void String::Format(char* strFormat, ...)
{
    va_list args;
    va_start(args, strFormat);
    char strBuffer[128];

    ::StrPrintF((char*)&strBuffer, strFormat, args);

    va_end(args);
}

The problem is this - the args variable always seems to point to a zero-byte
character - no matter what is passed in.
This means that Format("%d", nValue) does not work because ::StrPrintF()
thinks that there are no parameters.

I have looked at the official PalmOS documentation, Knowledge Base, Forums
and Newsgroups and nothing I have read indicates that there should be any
problems using this stuff - indeed it would be difficult for Palm to have
written ::StrPrintF() at all unless va_list, etc worked.

If anyone can shed any light on this I would be grateful,

Thanks in Advance

Jonathan Cox
[EMAIL PROTECTED]
(remove .NOSPAM to email)





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

Reply via email to