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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38159b1b5557a2e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-26 19:16:47 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!sjc70.webusenet.com!news.webusenet.com!pd7cy2so!shaw.ca!border1.nntp.ash.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 26 Jan 2004 21:16:41 -0600 Date: Mon, 26 Jan 2004 22:16:39 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Endian-Independent Rep Clauses References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.77.160 X-Trace: sv3-CkQqZ7FwbCjmia4QOLzEBBzj8pZZMmJAc7QcWgYhCRUpAcgzCHKlu6k+wYUgvlGFXWd5z5oGMrGFVhp!/Iv/MvLQWSTFj0T9Y5VNPy3a+D/746efDUC8MDzCPhqi7yGBqxY7TNxSlfFa7A== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:4871 Date: 2004-01-26T22:16:39-05:00 List-Id: Stephen Leake wrote: ... > There is probably a way to improve the SAL.Endianness package, so I > don't need more than one. I was unable to find a smaller expression > for the rep clauses. You can use the method I recommended for defining the contents of SAL.Endianness in a manner that derives it all from System.Default_Bit_Order. Then it is really worth defining some additional constants there that make it easier to define some common fields. i.e. Byte1_First: constant := .... Byte1_Last constant := ... Then you can layout things using those constants. The way I do it is to put all the cruft into one package spec, then when I need a bit position defined that isn't in there, I add it. It could grow like Topsy, but I found that mostly I needed about a dozen values. (But it is worth noting that I had two sets, one set that was right for String layouts and another for numbers.) -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush