It becomes me as if you used 4-Byte integer, while StrPrintF expects 2-Byte
arguments. Try %ld instead of %d.
Jan Slodicka
----- Original Message -----
From: "Eitan" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 1:36 PM
Subject: Strange string format behavior... (On palm simulator)
> I try to use a simple string format, but the result
> seems wrong,
> I try it using CString, after this failed I try using
> StrPrintF
> Here is a demo code:
>
> CString myStr;
> myStr.Format("%d Test? %d last! %d" ,3,5,7);
> FrmCustomAlert(GeneralAlert, myStr, "", "");
>
> char msg[100];
> StrPrintF (msg,"%d Test? %d last! %d" ,3,5,7) ;
> FrmCustomAlert(GeneralAlert, msg, "", "");
>
> In both, the result where:
> "0 Test? 3 last! 0" (it should be "3 Test? 5
> last! 7")
> This code runs on Palm OS simulator, (5.0 and 5.2)
>
> I try to locate this in several places in my code the
> result where the same,
> When I try it on clean project it works as it should -
> "3 Test? 5 last! 7".
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/