What's so bad about scanf anyway??? (really what's bad about gets)
Michael Salmon
epames at eos.ericsson.se
Thu Nov 22 18:13:19 AEST 1990
In article <3797 at skye.ed.ac.uk> richard at aiai.UUCP (Richard Tobin) writes:
>You seem to have misunderstood Richard O'Keefe's point. By EOF,
>Richard meant the C #defined constant, normally -1. By <EOF>, he
>meant the key you press to send end-of-file (perhaps ^D), which is why
>he said:
>
>>>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, the same as your ERASE etc. characters
are special commands to the tty driver. By typing ^D when there are no
characters in the input buffer you are sending 0 characters which is the
end of file condition.
Michael Salmon
L.M.Ericsson
Stockholm
More information about the Comp.lang.c
mailing list