Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: type of character constants Keywords: character constants Message-ID: <781@twwells.uucp> Date: 14 Mar 89 17:20:33 GMT References: <13068@steinmetz.ge.com> <102@servio.UUCP> <10138@socslgw.csl.sony.JUNET> <1783@dlvax2.datlog.co.uk> <3711@xyzzy.UUCP> <1644@vicorp.UUCP> <8903140309.AA02400@champlain.dgp.toronto.edu> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 22 Summary: Expires: Sender: Followup-To: Distribution: In article <8903140309.AA02400@champlain.dgp.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes: : bill@twwells.uucp (T. William Wells) writes: : >There is a subtle difference. If 'c' is an integer constant, '\377' : >represents the value 255. If, on the other hand, it is a char : >constant, and characters sign extend, it represents -1. : : Nope, it is an int constant, and if chars are 8 bits and the system is twos : complement and chars sign-extend, it is -1. : Reference: K&R II p193, second-to-last sentence of the last full paragraph. Oops! I don't believe I wrote that! There is a distinction somewhere along those lines, but it's not relevant here. (See H&S, 2.7.3, p.21). Sorry. --- Bill { uunet | novavax } !twwells!bill (BTW, I'm going to be looking for a new job sometime in the next few months. If you know of a good one, do send me e-mail.)