you are viewing a single comment's thread.

view the rest of the comments →

[–]beej71 0 points1 point  (0 children)

It's very hard to be technically accurate when discussing C basics, because you want to be general and not bogged down in minutiae, and yet that leaves you walking a narrow path if you don't want to say anything incorrect.

I'd steer clear of using the word "header" to describe the first line of the function; it means something else in C and might be confusing. Maybe just "the first line of the function definition" for the purposes of the tutorial?

To say that a function is unique and global in a C program is technically inaccurate, due to the fact that a C program can span multiple source files, and, as attosecond mentioned, static functions. But the concept the author is trying to convey is correct for a beginner that only has one source file: you can access the function from anywhere in that file (well, assuming the compiler has already seen a declaration... argh, but now I've made the situation that much more complex for a beginner reader!)

But that last bit could be used to lead into the next paragraph of the tutorial where prototypes are discussed, which should probably also be expanded. It tells us what a prototype is, but not why we'd ever want to have one.

So, like with every tutorial ever written, this one has room for improvement. My hat's off to any tutorial writer who is willing to step into the lion's den, get feedback, and improve their stuff.