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,255a2533fba89f5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-17 19:52:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-server.caltech.edu!attla2!ip.att.net!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: Calculate and set Parity X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <0URh9.132981$Jo.38081@rwcrnsc53> NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1032317564 12.225.227.101 (Wed, 18 Sep 2002 02:52:44 GMT) NNTP-Posting-Date: Wed, 18 Sep 2002 02:52:44 GMT Organization: AT&T Broadband Date: Wed, 18 Sep 2002 02:52:44 GMT Xref: archiver1.google.com comp.lang.ada:29098 Date: 2002-09-18T02:52:44+00:00 List-Id: For this application I think the use of Unchecked_Conversion is the most straightforward. Personally I would convert to an array of elements of type "mod 2" and then do XOR's on all elements of the array to obtain the parity. SteveD "Sebastian" wrote in message news:am518n$qbq$1@newstoo.ericsson.se... > Hi, > > I need a subroutine that calculates the parity of a record type with the > size of 16 bits. Is there some nice way > to do this? I currently have a solution were I use Unchecked_Conversion to > convert my variable to an > array booleans, then I calculate every true etc. Is there some way to do > this without using Unchecked_Conversion. > > Greatful for any hints! > > /S >