[TUHS] v7 K&R C

John P. Linderman jpl.jpl at gmail.com
Sat May 16 10:43:22 AEST 2020


If I had been thick enough to declare c as an unsigned char, it would have
taken a good bit more than 50% of the time, and wouldn't have worked at all.

On Fri, May 15, 2020 at 4:02 PM <ron at ronnatalie.com> wrote:

> Unfortunately, if c is char on a machine with unsigned chars, or it’s of
> type unsigned char, the EOF will never be detected.
>
>
>
>
>
>
>
>
>    - while ((c = getchar()) != EOF) if (c == '\n') { /* entire record is
>    now there */
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20200515/1c09507c/attachment.htm>


More information about the TUHS mailing list