Sujet : Re: "A diagram of C23 basic types"
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 08. Apr 2025, 00:01:06
Autres entêtes
Organisation : None to speak of
Message-ID : <871pu3d1al.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Gnus/5.13 (Gnus v5.13)
bart <
bc@freeuk.com> writes:
[...]
Since numbers using exponents without also using decimal points are
rare in my code base, I've decided to experiment with numbers like 1e6
being integer constants rather that floats. (This is IN my language.)
You might want to look at Ada for existing practice.
In C, a constant with either a decimal point or an exponent is
floating-point. In Ada, 1.0e6 is floating-point and 1e6 is an integer.
Of course this isn't very helpful if you want to represent numbers with
a lot of non-zero digits; for that, you need digit separators.
[...]
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */