From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2004-01-04 22:46:23
Hi! On Sat, Jan 03, 2004 at 06:54:22PM +0100, carlos wrote: > does printf("%hu", unsigned_char_var); > outputs an short unsigned int? It works definitely for cc65, and I would even say it is portable. There's a small glitch because unsigned_char_var is promoted to int, and the %hu format specifier outputs the int as an unsigned short. Since unsigned types have the same sizes as the corresponding signed types, this should work on all platforms. BTW: For cc65, "unsigned short" and "unsigned" have the same size, so for cc65 your code is equal to printf ("%u", unsigned_char_var); Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2004-01-04 22:47:30 CET