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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4c06e1e4fc2bf2d1 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.190.251.MISMATCH!transit4.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Date: Tue, 05 Aug 2008 18:14:37 -0400 From: "Peter C. Chapin" User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Controlling endian-ness? References: <4897b7f5$0$19705$4d3efbfe@news.sover.net> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4898d0ca$0$19680$4d3efbfe@news.sover.net> Organization: SoVerNet (sover.net) NNTP-Posting-Host: 51b2c107.news.sover.net X-Trace: DXC=G<][gT2`4ecbZ<<3De[fciK6_LM2JZB_c?[BkgHU\_fb3?@`i3kGa5k0m`M9B6JIQjG8fk_FWnQ?n X-Complaints-To: abuse@sover.net Xref: g2news2.google.com comp.lang.ada:7182 Date: 2008-08-05T18:14:37-04:00 List-Id: anon wrote: > For using Unsigned_32. Why not just override the built-in Write attributes > routines for Unsigned_32 by re-writing the attributes routines. This may at > most require a new package with a few extra attributes routines that may > be needed. Also, this will also allow you to use "Shift_Left/Shift_Right" > directly with Unsigned_32. > > So in your program you could use: > > Data : Unsigned_32 ; > ... > Unsigned_32'Write ( Stream_Pointer, Data ) ; I actually tried something like this but the compiler told me that I couldn't redefine attributes for that type (or something like that). I think the problem is that since the type is defined in another package it is already frozen or some such. It could also be that I did it wrong. Peter