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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!news.ecp.fr!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 23 Jun 2014 09:32:26 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Cleanest Ada way to do this? References: <7eaee5fc-2045-4bb3-8b16-d757b54760da@googlegroups.com> <6yHpv.55741$G37.7010@fx07.iad> <543afc17-4c32-4e15-a52f-80fcc1fbeaa6@googlegroups.com> In-Reply-To: <543afc17-4c32-4e15-a52f-80fcc1fbeaa6@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <53a7d80b$0$6602$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 23 Jun 2014 09:32:27 CEST NNTP-Posting-Host: 0012e1a7.newsspool4.arcor-online.net X-Trace: DXC=ejVhWD\@ZD`V7cdk25=17_Obgd X-Complaints-To: usenet-abuse@arcor.de Xref: news.eternal-september.org comp.lang.ada:20548 Date: 2014-06-23T09:32:27+02:00 List-Id: On 23/06/14 08:46, hungupharps@gmail.com wrote: > I've got a bitfield representing the LCD data lines and I'm trying then to write bits from a Character into it. If you know the size of the Character, 8 say, unchecked_conversion seems possible, the target type being any 8-bit type that works, e.g. a packed array of bits, or an Unsigned_8. The first offering slices, the second providing for shifts and masks.