getc() != EOF
LaidigTL
toml at druxm.UUCP
Thu May 31 06:38:24 AEST 1984
> Char variables are promoted to int in expressions (see C manual)
> and a char -1 is IDENTICAL with an int -1. Unsigned char c could be
> different (Any C implementors there? (kvm?)).
>
> Chris Maltby
> University of Sydney
Jim Shankland answered this adequately, but for those who feel that only
the C Reference Manual contains truth, see page 183 (section 6.1,
"Characters and integers"). Note that of the four machines they
describe, only one sign-extends (converts a char whose leftmost bit is
one to a negative int).
Tom Laidig
AT&T Information Systems Laboratories, Denver
...!ihnp4!druxm!toml
More information about the Comp.unix.wizards
mailing list