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.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5ffde75d5ac5a4c2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Wed, 01 Feb 2006 19:34:57 +0100 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Debian Thunderbird 1.0.2 (X11/20051002) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: how to "put" a binary structure? (newbie question!) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <43e0ff45$0$4087$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Date: 01 Feb 2006 19:34:45 MET NNTP-Posting-Host: dcfb88ba.newsread2.arcor-online.net X-Trace: DXC=\?]kVXg`MRGL0\Y_Wg[Z[NQ5U85hF6f;DjW\KbG]kaMHCZ8X]Y4193NIlcknI\AGiHljUVjRQ60?BVmnOeiOY3@Ng[50F7T5IOB X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:2737 Date: 2006-02-01T19:34:45+01:00 List-Id: Norbert Caspari wrote: > > How can I correct the source code to print the values stored in the > structure Xxx? Is it possible, to print the whole content of Xxx with just > one put statement? Or alternatively how can I assign the content of Xxx to > another variable of the type Unsigned_8 that I can use for output? Or is > there maybe another way? In addition to Dmitry's suggestions, consider initialising an entire aggregate (record, or array). This way the compiler can check complete initialisation You can use the predefined 'Image attribute function of Bit_T for printing, as shown below. Xxx: Byte := (Bit0 => off, Bit1 => on, Bit2 => off, Bit3 => off, Bit4 => on, Bit5 => on, Bit6 => off, Bit7 => off); begin Text_IO.put_line("Bit 1 is " & Bit_T'image(Xxx.Bit1)); -- etc. end bittest; -- Georg