>at least one authority -- the GNU C Library Manual --
>suggests that using EOF macro is not reccommended:
The only reason they don't recommend the EOF macro is because it doesn't differentiate between errors and an actual end of file -- the same behavior is exhibited in the return value of fgets(), so you're not any better off using that as a loop condition. (And I suppose the implication is that GNU also doesn't recommend checking the return value of fgets() for the same reason.)

okay, I'm going to stop arguing this because you guys are technically more precise than I am.

suffice to say, I use fgets(), and if i ever need to specifically search for end-of-file, i use feof() in conjunction with ferror(). this approach is generally supported by the GNU C manual, and i've found it to always be reliable.


.

>okay, I'm going to stop arguing this because you guys are technically more
>precise than I am.
Never mind us nitpicks, we thrive off others' inaccuracies (however minor they may be) :P

Rather than looking for consensus, you would be better served by obtaining your own opinion based in practice and understanding how the language works.
Then your confidence will increase, and it will cut through the self-promoted ego BS projected around you.

It doesn't seem like a topic of opinion though. Just trying to learn without going through the effort of multiple test programs. Because I don't remember any C and don't have too much time on my hands right now. And I'm egotistical?

(If so, :( )

It doesn't seem like a topic of opinion though

well, apparently this one is.

hey, that reminds me, which is better: big endian or little endian? i seem to have forgotten...

commented: Big Endian. +18

Rather than looking for consensus, you would be better served by obtaining your own opinion based in practice and understanding how the language works.
Then your confidence will increase, and it will cut through the self-promoted ego BS projected around you.

It doesn't seem like a topic of opinion though. Just trying to learn without going through the effort of multiple test programs. Because I don't remember any C and don't have too much time on my hands right now. And I'm egotistical?
(If so, :( )

Are you egotistical? I don't know. I don't know you.
Allow me to explain further.
Ask ten programmers a question and you'll get ten answers. And that's alright. Now, an interesting phenomena happens when you put those ten programmers in the same room as you ask the question. The only constant you can expect is ego. Which given enough audience it will transform into BS. Thus my later reference rather than a personal attack to anyone.

Infinite amount of theory will never be able to substitute a minute of experience. Therefore, find time to practice, if learning is what you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.