| Deutsch English Français Italiano |
|
<vs0e6r$1avlb$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?) Date: Wed, 26 Mar 2025 09:34:35 +0100 Organization: A noiseless patient Spider Lines: 48 Message-ID: <vs0e6r$1avlb$2@dont-email.me> References: <vrd77d$3nvtf$2@dont-email.me> <868qp1ra5f.fsf@linuxsc.com> <vrdhok$47cb$2@dont-email.me> <20250319115550.0000676f@yahoo.com> <vreuj1$1asii$4@dont-email.me> <vreve4$19klp$2@dont-email.me> <20250319201903.00005452@yahoo.com> <86r02roqdq.fsf@linuxsc.com> <vrh1br$35029$2@dont-email.me> <LRUCP.2$541.0@fx47.iad> <vrh71t$3be42$1@dont-email.me> <KFVCP.594649$SZca.498578@fx13.iad> <vrhb77$3frk8$1@dont-email.me> <vrru8f$174q6$1@dont-email.me> <86o6xpk8sn.fsf@linuxsc.com> <vrtmu4$2s1q2$1@dont-email.me> <20250325011327.41@kylheku.com> <20250325131110.000056bd@yahoo.com> <86bjtpjp22.fsf@linuxsc.com> <vruid4$3iuvq$1@dont-email.me> <87iknw7sz8.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 26 Mar 2025 09:34:35 +0100 (CET) Injection-Info: dont-email.me; posting-host="9e00a15ae379d2cae7edd65ac25a9709"; logging-data="1408683"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ksdTyUuOQyEwyi5GY8T1yHGqk3zqP6us=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:KRghjR2kKx6kWd2wJCR2ZsRnMcg= Content-Language: en-GB In-Reply-To: <87iknw7sz8.fsf@nosuchdomain.example.com> Bytes: 3761 On 25/03/2025 21:31, Keith Thompson wrote: > David Brown <david.brown@hesbynett.no> writes: > [...] >> "Everyday English" does not cover negative numbers at all - in >> "everyday English", "integer" and "whole number" are basically >> synonymous and mean 1, 2, 3, etc. > > Perhaps I don't speak everyday English. > > Most people probably rarely use the word "integer". Agreed. (To be clear here - I have not asked "most people", so I can't claim good statistical evidence for any of this.) > When they do, > if they use it correctly, they use it to refer to the set of numbers > with no fractional part, which can be positive, zero, or negative. > I've never heard the word "integer" used in a way that excludes > negative numbers. > > The way I was taught in elementary school: > > The integers are ..., -2, -1, 0, 1, 2 ... > The natural numbers are 1, 2, ... > The whole numbers are 0, 1, 2, ... > Sure. But most people have forgotten such details long ago - negative numbers are not part of daily life (except as an indicator of how much you owe the bank...). After all, negative numbers are not natural! So if you ask someone random "Do you know what an integer is?", a likely response will be "That's a whole number, isn't it? Like 1, 2 or 3 - not something like a half." > There isn't universal agreement on whether the natural and/or whole > numbers include 0. Ada, for example, has a subtype Natural whose lower > bound is 0 (Positive starts at 1), which was very slightly jarring when > I first encountered it. > The most relevant for most languages is whether array indices start at 0 or 1, and I have always understood that it varies - thus you have to know where you stand in a given language. Perhaps learning to program in BASIC - with its wildly inconsistent variations - wasn't /entirely/ harmful :-)