Xref: utzoo comp.std.unix:482 comp.std.c:2326 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!longway!std-unix From: brnstnd@stealth.acf.nyu.edu Newsgroups: comp.std.unix,comp.std.c Subject: How to convert a char into an int from 0 through 255? Message-ID: <498@longway.TIC.COM> Date: 6 Jan 90 21:37:08 GMT Sender: std-unix@longway.TIC.COM Reply-To: uunet!stealth.acf.nyu.edu!brnstnd (Dan Bernstein) Followup-To: comp.std.unix Organization: IR Lines: 10 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman) From: brnstnd@stealth.acf.nyu.edu The question is self-explanatory. This is a practical question as well as a theoretical one: I'd like a solution that is both conformant and portable in the real world. Does (int) (unsigned int) ch do the trick? What about (int) (unsigned char)? ---Dan Volume-Number: Volume 18, Number 8