type of character constants
T. William Wells
bill at twwells.uucp
Wed Mar 15 03:20:33 AEST 1989
In article <8903140309.AA02400 at champlain.dgp.toronto.edu> flaps at dgp.toronto.edu (Alan J Rosenthal) writes:
: bill at 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.)
More information about the Comp.lang.c
mailing list