Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Range-aware modulo operator -% Date: Tue, 01 Jan 2019 16:09:34 -0800 Organization: None to speak of Lines: 29 Message-ID: References: <9RxWD.81420$N45.2557@fx21.am4> <65TWD.67453$Ab5.11301@fx04.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="4d2fb03eb8a6f1b5fb918b8f9f106071"; logging-data="31923"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18roMAwz//A7v1dyRYJw162" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:/DYf8XP7FMp2J8BfxiuAjbm0rto= sha1:A1mGgijMnj+8FDCL9F3iW4AZHzU= Xref: csiph.com comp.lang.c:139343 Bart writes: > On 01/01/2019 20:48, Keith Thompson wrote: [...] >> So you think it's simpler to describe it in terms of a type that exists >> only internally in your compiler? Did you expect the rest of us to know >> what you meant by "Bool"? > > You said C90 didn't have boolean types. I'm saying it doesn't matter. > I'm sure people will easily guess how such a boolean type might work. Yes, I said C90 didn't have a boolean type -- and you snipped the context in which I explained why that's relevant. > I just found it easier to think about the expression A in if(A), > while(A) etc as requiring a Bool type, even if such a type doesn't exist > in the language, and even if it doesn't need to be actually evaluated as > 0 or 1 (often code can act directly on condition flags). I believe that you find it easier. I trust you're aware that you're not typical. But I'm curious, do you understand the description in the standard? Did you even know what it said before I pointed it out? -- Keith Thompson (The_Other_Keith) kst@mib.org Will write code for food. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"