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,efe03f20164a417b X-Google-Attributes: gid103376,public From: bill@valiant.gmrc.gecm.com (R.A.L Williams) Subject: An observation of Ada (may offend) Date: 1995/03/30 Message-ID: <3ledip$a0f@miranda.gmrc.gecm.com>#1/1 X-Deja-AN: 100540666 organization: GEC-Marconi Research Centre newsgroups: comp.lang.ada Date: 1995-03-30T00:00:00+00:00 List-Id: In article <1995Mar28.120720.9512@eisner> Larry Kilgallen wrote: [deleted up to where I wrote...] : > I agree that the representation clauses defined in the LRM are splendid, : > the problem is that they are *optional*. I don't know what the situation : > is now, but when I last did a lot of work in Ada many compilers had only : > a fragmentary coverage. : Well, since the compiler _I_ use has them, who cares about the rest of : you :-) :-) :-). : Actually, if implementation of representation clauses was specified as : optional (I cannot find that statement), the Ada83 author(s) presumably LRM section 13.1 para 10: "... An implementation may limit its acceptance of representation clauses to those that can be handled simply by the underlying hardware. ..." Now, in the old days, many compiler vendors treated this as a general cop-out. I haven't bought an Ada compiler recently, so I don't know if this is still the situation. : felt they were hard to accomplishment and would require market pressure : to cause implementation. At least (unlike Pascal) the syntax for adding : them is _standardized_, so once you have convinced your vendor, the : implementation they provide will be compatible. Yes, Pascal doesn't even have a *usable* standard. Every compiler I've come across has vast numbers of incompatible extensions, little things like separate compilation etc. (!) ANSI C is standardized, but the standard is not explicit on the order of bit fields within a structure. The only ambiguity I know of in the Ada83 LRM is section 13.4, para 5, where it says "...The first bit of a storage unit is numbered zero...." without saying whether this is the MSB or the LSB (the same also goes for storage units in a word of course). : > Most of the time, as you say, bit fields are adequate, but how would you : > implement ECC algorithms or maximal length sequence generators for instance? : Larry Kilgallen Bill Williams