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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7fafe440ec61d8a3 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: HELP! ADA and Binary Strings Date: 2000/03/19 Message-ID: #1/1 X-Deja-AN: 599650043 Sender: bobduff@world.std.com (Robert A Duff) References: <38D4CEB9.A2D70036@netscapeonline.co.uk> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-03-19T00:00:00+00:00 List-Id: j80edd writes: > In order to calculate then hamming distance the xor opperator is used on > the two binary strings, and then the number of ones is counted. The > problem is how to hold the binary strings. Is there any way in ada to > access the binary value of a integer or character? currently i am > trying to us an array of an array of type boolean. Any help would be > greatly appreciated. Arrays of booleans have "xor". Look up Unchecked_Conversion and pragma Pack. Also, perhaps, modular types. - Bob