From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Parameterised 'Image Attributes Date: Sat, 19 Aug 2023 11:14:34 +0200 Organization: Adalog Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 19 Aug 2023 09:14:30 -0000 (UTC) Injection-Info: dont-email.me; posting-host="5313c0efa581855a557fbab8f534a02e"; logging-data="796946"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19H2+guPlN5g+0MsUEV/0/J" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cancel-Lock: sha1:3/S/VovpdkOiW4YXAweLBMuIV5w= In-Reply-To: Content-Language: en-US, fr Xref: news.eternal-september.org comp.lang.ada:65536 List-Id: Le 18/08/2023 à 10:25, Luke A. Guest a écrit : > On 18/08/2023 08:18, Rod Kay wrote: >> Hello.all, >>     There has been some recent discussion on #ada irc regarding >> formatted output. >> >>     Would it be possible/desirable to allow the 'Image attribute to >> have formatting parameters ? Something along the lines of ... >> >>     put_Line (some_Integer'Image (Width => 5, Padding => '0')); >> >> ... and similar 'Image attribute parameters for other types. >> >>     If the parameters have defaults, then there should not be any >> backwards compatibility issues (I think). > > I wanted them for ages, but there was a conversation ages ago where > someone on here said attributes were for "debugging only," yet that's > not what the arm says. > The intent of the 'Image attribute is to have a quick representation, mainly for debugging purposes. If you want nice formatted output, use the Put procedure on String from Text_IO. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX https://www.adalog.fr https://www.adacontrol.fr