comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
Subject: Re: Cleanest Ada way to do this?
Date: Mon, 23 Jun 2014 11:48:38 +0000 (UTC)
Date: 2014-06-23T11:48:38+00:00	[thread overview]
Message-ID: <lo946m$5lm$1@dont-email.me> (raw)
In-Reply-To: 53a7d80b$0$6602$9b4e6d93@newsspool4.arcor-online.net

On 2014-06-23, Georg Bauhaus <rm-host.bauhaus@maps.futureapps.de> wrote:
> 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.
>

Wouldn't a better approach be to start with Character'Pos instead of a
Unchecked_Conversion ?

I'm genuinely curious. I'm wondering if there's something I am missing.

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world

  reply	other threads:[~2014-06-23 11:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22 16:51 Cleanest Ada way to do this? Mike Silva
2014-06-22 19:07 ` Simon Clubley
2014-06-22 21:20   ` Mike Silva
2014-06-22 21:05 ` Shark8
2014-06-23  0:17   ` Simon Clubley
2014-06-23  6:46     ` hungupharps
2014-06-23  7:32       ` Georg Bauhaus
2014-06-23 11:48         ` Simon Clubley [this message]
2014-06-23 15:40           ` G.B.
2014-06-23  9:02 ` rrr.eee.27
2014-06-23 11:57   ` Simon Clubley
2014-06-23 12:05     ` rrr.eee.27
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox