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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5ca83d39f5b3a6c0,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-07 10:42:08 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!coop.net!newsfeed1.global.lmco.com!news.orl.lmco.com!news From: "mop" Newsgroups: comp.lang.ada Subject: quick question Date: Fri, 7 Sep 2001 12:00:51 -0400 Organization: Lockheed Martin -- Information Systems Center Message-ID: <9naqvp$rlf$1@zeus.orl.lmco.com> NNTP-Posting-Host: orlsr006538.orl.lmco.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:12908 Date: 2001-09-07T12:00:51-04:00 List-Id: I have something along these lines Data : SomeType is ( word1 => (x.a => 1, x.b => Normal), --etc word8.checksum => Compute_Checksum); Compute_Checksum here is a procedure that does a "straight" sum on the bytes. Dont care about overflow. So now i need to take whatever value compute_checksum returns and "pack" in word8.checksum. I'm thinking that all i need to do is create some sort of array such that: type SomeType_Array is array (SomeType) of BYTE; Trouble is is I'm hearing I need to do some sort of Unchecked Conversion because of words like "Normal" which is not an integer or real, etc? Is this true, If yes how to do this. Here is procedure Compute_Checksum procedure Compute_Checksum is Checksum : BYTE : = 0; begin for i in SomeType_Array'First .. SomeType_Array'Last -1 loop Checksum := Checksum + SomeType_Array (i); end loop word8.checksum := Checksum; end procedure Compute_Checksum;