From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,INVALID_MSGID, PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public From: seebs@plethora.net (Peter Seebach) Subject: Re: How big is an int? (was: Yet another stupid language war (was: ... the only languages you need!!)) Date: 1997/11/06 Message-ID: <63rasf$1ug$1@darla.visi.com>#1/1 X-Deja-AN: 287313988 References: <34557f2b.1934172@news.mindspring.com> <63qkp9$bqr$3@darla.visi.com> <63r2sv$rgm$1@helios.crest.nt.com> NNTP-Posting-Date: 05 Nov 1997 20:43:27 CST Organization: Plethora Internet Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java.advocacy,comp.lang.c,comp.lang.c++ Date: 1997-11-05T20:43:27-06:00 List-Id: In article <63r2sv$rgm$1@helios.crest.nt.com>, Kaz Kylheku wrote: >But it cannot be a conforming hosted implementation, as I pointed out >in the other article, because the getc() and putc() functions require >the int type to represent everything in the range of 0 to UCHAR_MAX, >plus the extra value EOF. It therefore follows that a hosted implementation >requires the additional requirement: > char < int >This sort of thing would be good subject matter for a C-language version of >Trivial Pursuit. I don't think anything is broken by an implementation which has unsigned char values which are negative when converted to int. Typically, such implementations would only return smallish positive values, or EOF, from getchar(), so it doesn't matter... (Hmm. I hadn't thought about ungetc, though; I'll bring that up at the next meeting, if I remember.) -s -- seebs@plethora.net -- Speaking for myself. No spam please. Copyright 1997. All rights reserved. This was not written by my cat. C/Unix wizard - send mail for help! -- - More Net, Less Spam!