Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site druxm.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!drutx!druxm!toml From: toml@druxm.UUCP (LaidigTL) Newsgroups: net.unix-wizards Subject: Re: getc() != EOF Message-ID: <862@druxm.UUCP> Date: Wed, 30-May-84 16:38:24 EDT Article-I.D.: druxm.862 Posted: Wed May 30 16:38:24 1984 Date-Received: Sat, 2-Jun-84 07:29:55 EDT References: <30@utastro.UUCP> <307@basser.SUN>, <407@drutx.UUCP> Organization: AT&T Information Systems Laboratories, Denver Lines: 16 > 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