comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: aliased & packed?
Date: 1997/05/10
Date: 1997-05-10T00:00:00+00:00	[thread overview]
Message-ID: <dewar.863322720@merv> (raw)
In-Reply-To: 33734C0C.6904@bix.com


Tom Moran said

<<Clearly you can't do it.  I'd like to use pragma Pack for bits in a
black/white bitmap array.  That's easy to manipulate.  But to actually
display it I need to do a system call and pass the address.  If it
wasn't packed, Image'unchecked_access would be appropriate.  But
that won't work because Image would have to be aliased, and it can't
be because it's packed. Must I drop 'Pack' and make it an array of
bytes and do my own masking, shifting, etc?  What's the cleanest/most
portable/best way to accomplish the task?>>

I don't understand, what is Image? The whole array? Of course you can
take the access of a packed array, but then the *array* needs to be
aliased, not its components. The components only need to be aliased
if you need the access of individual array elements, but clearly that
makes no sense if the elements are on arbitrary bit boundaries.

If what you want to do makes sense here, it can be done, please explain
more clearly what you are trying to do precisely!





  parent reply	other threads:[~1997-05-10  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-09  0:00 aliased & packed? Tom Moran
1997-05-09  0:00 ` Stephen Leake
1997-05-09  0:00   ` Tom Moran
1997-05-10  0:00 ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-05-11  0:00 tmoran
1997-05-11  0:00 ` Robert Dewar
1997-05-11  0:00   ` Tom Moran
1997-05-12  0:00     ` Robert Dewar
1997-05-12  0:00       ` Robert A Duff
     [not found]         ` <1997May13.065907.1@eisner>
1997-05-13  0:00           ` Robert Dewar
1997-05-13  0:00           ` Robert A Duff
1997-05-13  0:00             ` Larry Kilgallen
1997-05-14  0:00             ` Richard Kenner
replies disabled

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