From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d7ae8269a4ecf7c4 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Prevalence of Compilers for Which Integer'Size < 32? Date: 1996/07/29 Message-ID: #1/1 X-Deja-AN: 170842429 references: organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-07-29T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >because it is much easier to see that 86_400 is bigger than 32767 than >it is to see that 60*60*24 is bigger than 2**15-1 :-) Good point. But in another post in this thread, it would have been pretty easy to see that 2**31-1 is bigger than 2**15-1. I refuse to memorize the decimal value of 2**31 -- it's a waste a of brain cells. I just know that it's a little over 2 billion (for the U.S. meaning of "billion"), and that's enough. I've seen a lot of Ada code that uses giant literals, when a static expression like 2**31-1 or whatever would have been more readable. E.g. I've seen: X: constant := 2_147_883_648; -- 2**31 Never use a comment when you can say it in the language proper. I've also seen things like: X: Integer := 100000000; -- ten million where the programmer apparently didn't realize that underscores are allowed, and make things more readable. And I've even seen bugs (as in the above) because the number of zeros was miscounted. - Bob