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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9d0a6d42d2076a13 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: aliased & packed? Date: 1997/05/09 Message-ID: <33739A50.7B99@gsfc.nasa.gov>#1/1 X-Deja-AN: 240657386 References: <33734C0C.6904@bix.com> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.ada Date: 1997-05-09T00:00:00+00:00 List-Id: Tom Moran wrote: > > 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? Since the system call wants the address, use 'address (converted to Long_Integer or whatever is required). You have to do some conversion to pass to a system call; converting from 'unchecked_access is no "cleaner" than converting from 'address. As for portability, there will be a different system call to display bitmaps, so you'll have to change a lot more than the attribute! -- - Stephe