On Fri, Feb 27, 2009 at 10:37:30PM +0100, Vincent Trouilliez wrote:
> On Fri, 27 Feb 2009 22:10:16 +0100
> David Brown <[email protected]> wrote:
>
> > sprintf((A_String + i), "%c", 0xff)
> >
> > has exactly the same effect as:
> >
> > A_String[i] = 0xff;
> > A_String[i + 1] = 0x00;
> > delay_about_1000_processor_cycles();
> > waste_about_2000_bytes_of_code_space();
>
> ROTF ! :-))))
sprintf() only costs 2kB? Sure enough, this little program is 2132 bytes
after strip:
#include <stdio.h>
main()
{
char tmp[100];
sprintf( tmp, "%d", 10 );
}
--
David Kelly N4HHE, [email protected]
========================================================================
Whom computers would destroy, they must first drive mad.
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list