Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Auto-execute code at exit? Date: Tue, 12 Dec 2017 09:35:54 -0800 Organization: None to speak of Lines: 26 Message-ID: References: <016d6ddd-a7f6-498f-9fa0-244a5879bb9f@googlegroups.com> <%e%WB.128226$oe2.49084@fx15.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="2531e6254908a9a33b8caa375a1a656d"; logging-data="18195"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uY7HllotNAo5j/wMSarLJ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:UJnHjl0AaVeydwICO2Yt2ItXyJA= sha1:WkAQolialySA61YLM9POtSVrCfI= Xref: csiph.com comp.lang.c:124224 David Brown writes: > On 11/12/17 21:28, bartc wrote: >> Or like numeric separators so that you can tell instantly that >> 1_000_000_000 is a billion (unlike C where you have to count the zeros >> in 1000000000)?. >> > > I would write "1000 * 1000 * 1000", or use named constants - no need to > count the zeros. If C /had/ separators, I'd prefer to use them. We > have had C for decades, without numeric separators - it is not an > essential feature. [...] 1000 is of type int, so 1000 * 1000 * 1000 is of type int. 1000000000 is of whatever type it needs to be to hold that value. This particular case is not an issue if int is at least 32 bits. 1000L * 1000L * 1000L is more reliable. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"