What's so bad about scanf anyway??? (really what's bad about gets)

Richard Tobin richard at aiai.ed.ac.uk
Tue Nov 27 03:02:24 AEST 1990


In article <1990Nov22.071319.3222 at ericsson.se> epames at eos.ericsson.se writes:

>>>>Let <EOF> represent your end-of-file character on a UNIX system

>^D is *NOT* an eof character, it is a command to the tty driver to send
>the contents of the input buffer,

I thought I had made it quite clear what happens when you type ^D.

Are you trying to make a substantial point here, or are you just 
quibbling about the term "end-of-file character"?

When Richard O'Keefe says "end-of-file character" he means "the
character you type when you want to cause the program to see an
end-of-file condition".  Just like "erase character" (a term you used
yourself) means "the character you press when you want to erase a
character", and "suspend character" means "the character you press
when you want to suspend your program".

If your point is that the behaviours after newline and after other
characters are really the same - ie send the waiting characters, of
which there may be a zero or non-zero number - then yes, that's true,
but it's normally more useful to distinguish these cases.

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.lang.c mailing list