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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 11 May 2009 14:18:09 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Allocation question References: <4a07fc7a$0$2855$ba620e4c@news.skynet.be> <20090511125735.1edd4b47@troy.s.riegger.name> In-Reply-To: <20090511125735.1edd4b47@troy.s.riegger.name> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a081781$0$30224$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 11 May 2009 14:18:09 CEST NNTP-Posting-Host: 0dd49a45.newsspool1.arcor-online.net X-Trace: DXC=AQKLC8AJ6PJ?[X6JIXEic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbI8=K?`;jhVXE;9OJDO8_SKFNSZ1n^B98iJJ=PZT`lnmiA X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5760 Date: 2009-05-11T14:18:09+02:00 List-Id: Philipp Riegger schrieb: > On Mon, 11 May 2009 12:23:11 +0200 > Olivier Scalbert wrote: > >> type Color_T is record >> Red: Integer; >> Green: Integer; >> Blue: Integer; >> end record; > > You can force a Size of 2 bit for this type by "for Color_T'Size use > 2;". How would this work? In fact, ==============Error messages for source file: image.ads 9. for Color_T'Size use 2; | >>> size for "Color_T" too small, minimum allowed is 96 11. type Image_T is array(Positive range <>, Positive range <>) of Color_T; | >>> component size for "Image_T" too small, minimum allowed is 96 But I'd add a type for the range of permissible values per color. If each value is in range 0 .. 255, then three of them will need 24 bits and the components of an array can be packed.