[TUHS] v7 K&R C
Paul Winalski
paul.winalski at gmail.com
Mon May 18 02:38:26 AEST 2020
On 5/17/20, ron at ronnatalie.com <ron at ronnatalie.com> wrote:
>>
>> so here the EOF was different and char was signed 7-bit it seems.
>
> That makes perfect sense if you're dealing with ASCII, which is a 7-bit
> character set.
>
> But that assumes you were reading "characters" rather than "bytes." Binary
> data certainly could be any combination of 8 bits and you'd want something
> out of band to signal errors/eof.
Well, the function in question is called getchar(). And although
these days "byte" is synonymous with "8 bits", historically it meant
"the number of bits needed to store a single character".
-Paul W.
More information about the TUHS
mailing list