comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Re: Minimum Record Size?  LONG
Date: 25 Apr 2003 13:35:43 -0400
Date: 2003-04-25T17:50:53+00:00	[thread overview]
Message-ID: <uk7dixyxc.fsf@nasa.gov> (raw)
In-Reply-To: Hrdqa.9680$io.307974@iad-read.news.verio.net

Dr Nancy's Sweetie <kilroy@elvis.rowan.edu> writes:

> I'm working on a program which has to take four six-bit hunks of data
> and regroup them into three eight-bit hunks.  

Ok

> My first pass looked like this:
> <snipped>
> 
> This worked, but it seemed a little klunky.  Figuring there ought to
> be a better way, I tried an Unchecked_Conversion:

Please post actual, complete, compilable code. That makes it easier
for us to compile it, add the necessary changes, and post it back.

>       type Six_Bits is mod 2**6;

you probably need a size clause here.

>       type Four_Sixes is array (0..3) of Six_Bits;

and here you need a component size clause, and/or a pragma Pack.

same for Three_Group.

-- 
-- Stephe



  reply	other threads:[~2003-04-25 17:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25 16:33 Minimum Record Size? LONG Dr Nancy's Sweetie
2003-04-25 17:35 ` Stephen Leake [this message]
2003-04-25 17:36 ` Mark Johnson
2003-04-25 21:54   ` tmoran
2003-04-25 18:51 ` David C. Hoos
2003-04-25 21:51   ` tmoran
2003-04-26  3:00     ` David C. Hoos
2003-04-26  2:12 ` Steve
2003-04-27  1:57   ` Rick Stikkers
2003-04-27 12:06   ` David C. Hoos
2003-04-27 14:17     ` Steve
2003-04-27 20:25       ` David C. Hoos
2003-04-28  5:04         ` Steve
replies disabled

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