Confusion in C
ajward
Posts: 1,130
Hi All...
Another question, but first my usual reaction to coding in C.
I've come across these guys: scan and scanf also print and printf. What difference does the "f" make? They "seem" to do the same thing. The Great InterWebs isn't any help here. All I can find are references to scanf and printf.
Thanks for any advice!
Amanda
Another question, but first my usual reaction to coding in C.
I've come across these guys: scan and scanf also print and printf. What difference does the "f" make? They "seem" to do the same thing. The Great InterWebs isn't any help here. All I can find are references to scanf and printf.
Thanks for any advice!
Amanda
Comments
print and scan are versions invented by Parallax that in most cases will use less memory.
I too have had trouble with sorting out the names and _simple_printf might be a way to make this all go away.
After trying to be a diligent ANSI C student and study all and everything in the ANSI C, 2nd ed., I just had to accept that all the discussion of scanf and printf were mostly legacy material. On the one hand, it bogs down small microcontrollers trying to use a serial port. On the other hand, big computers tend to do all and everything in GUI.
Fully mastering scanf and printf might just be a waste of time.
http://en.wikipedia.org/wiki/Pareto_principle
So I wrote a simple base conversion routine which turned out to run 3x faster and take 1/10 the space.
It's very confusing having print/scan, _simple_printf and the tiny lib. It seems like the tiny lib approach would be the easiest one for newbies and experienced programmers.
Amanda
@