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: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Prevalence of Compilers for Which Integer'Size < 32? Date: 1996/08/03 Message-ID: #1/1 X-Deja-AN: 172104317 references: <4tdp24$5h1@news.pacifier.com> <31FE0C01.302F@lmtas.lmco.com> <31FF5CF0.5C13@lmtas.lmco.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-08-03T00:00:00+00:00 List-Id: Ken said "Considering I had to start with "anInt32", I didn't really worry about the clarity of the named number name! Of course, Word_Length_In_Bits is also horrible if (a) you're declaring multiple types with different widths in the same package and/or (b) the software might be used somewhere where the machine word wasn't 32 bits." You missed my point, case (b) is *exactly* the case where the name Word_Length_In_Bits might be appropriate if that is what you really want. Of course if you use the software somewhere where the machine word is not 32-bits, then you would have to modify this declaration. Ada code can be made to be automatically portable most of the time, but not necessarily all the time, since the predefined set of attributes is not necessarily powerful enough to parametrize everything you want. In this particular case, if you really wanted the machine word size to govern the length of the type, you could probably use System.Word_Size (or in GNAT Standard'Word_Size) and completely avoid the dreaded 32, in the declaration as *well* as in the name.