Sujet : Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 25. Mar 2025, 21:31:07
Autres entêtes
Organisation : None to speak of
Message-ID : <87iknw7sz8.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
User-Agent : Gnus/5.13 (Gnus v5.13)
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". 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, ...
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.
[...]
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */