On Wed, Dec 01, 2004 at 10:32:53AM +0100, Spiro Trikaliotis wrote: > Now, let's suppose I want to write something like > > sprintf(buffer, "M-W\0x01\0x02\0x03"); > > This string literal would be translated, thus, it is not a good idea. Hmm, don't you mean "M-W\x01\x02\x03"? As far as I've understood, the character set translation takes place at a later stage where the escapes are no longer available, i.e., the translator doesn't know if you typed "M" (which you would like to have translated) or "\x4d" (which you would like to be passed as such). > Now, should > > sprintf(buffer, "M-W%c%c%c", 0x01, 0x02, 0x03); > > show the expected behaviour? Or do I have to use the char array, as > above? The parameters to sprintf are not char constants, are they? Marko ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Wed Dec 1 11:40:35 2004
This archive was generated by hypermail 2.1.8 : 2004-12-01 11:40:45 CET