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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,64599bfe530783cd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-19 08:16:09 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!194.168.4.91.MISMATCH!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-glfd.server.ntli.net.POSTED!53ab2750!not-for-mail From: chris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031014 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Any examples of Byte Ordering Functions References: <1066243458.911546@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 19 Oct 2003 16:22:17 +0100 NNTP-Posting-Host: 81.98.236.129 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-glfd.server.ntli.net 1066576569 81.98.236.129 (Sun, 19 Oct 2003 16:16:09 BST) NNTP-Posting-Date: Sun, 19 Oct 2003 16:16:09 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:1135 Date: 2003-10-19T16:22:17+01:00 List-Id: Martin Dowie wrote: > You could write your own functions to do this - it is trivial, esp if you > are dealing with the predefined type Unsigned_32. Trivial? :( Can you tell me how to do it pls? I have the following: type byte is mod 256; type word is mod 2**16; type dword is mod 2**32; for byte'size use 8; for word'size use 16; for dword'size use 32; I can do stream -> word and back using multiplication/division for big and little endian, but not dword. Chris