avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Re: sprintf


From: David VanHorn
Subject: Re: [avr-gcc-list] Re: sprintf
Date: Fri, 27 Feb 2009 16:50:57 -0500


> 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 ! :-))))
As was earlier, and more gently pointed out by Dave, Sprintf was pretty wasteful.
It worked though, and that's what the programmers here suggested I use.
They are "big iron" guys, so less sensitive to the costs.
Also, given that I had plenty of code space and cycles, the use of sprintf was "good enough", in that it allowed me to demonstrate the system, and show live data from my sensors.
 
Dropping the data into the array is unarguably more efficient, and I shall use that approach in the future.
 
I will admit to being ignorant in C, but I'm not stupid.  :)
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]