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: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Parameterised 'Image Attributes Date: Mon, 28 Aug 2023 12:58:23 +0200 Organization: A noiseless patient Spider Message-ID: References: <4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 28 Aug 2023 10:58:21 -0000 (UTC) Injection-Info: dont-email.me; posting-host="5a879763e13e5c6e904f542db0b53b64"; logging-data="1761273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/uMcvM6SaByn6h9UzBOP0/q8deux77MU=" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cancel-Lock: sha1:ULq6BPf+uRm21BXvR5XVUBZooIM= In-Reply-To: Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:65566 List-Id: On 2023-08-28 11:18, Stephen Davies wrote: > I did read Randy's response, he explained the difficulty in adding > parameters to 'Image, He rather explained that this will never happen... (:-)) There is no good reason why attributes should not have the same parameter syntax as subprograms and entry calls. Neither there is one why 'Image must be a non-overridable attribute or why different classes of types must have same parameter lists in their 'Image. > so I suggested an alternative parameter-less > attribute. You could allow the output of this attribute to be > configurable by either some package data (c.f. Text_IO.Default_Width) > and/or by the OS. To be honest, all I really want is an attribute that > any Ada program can use to get a string suitable for output to its > users, i.e no leading space and exponentiation only used when needed. This will not happen either. But here I would agree, it is clearly a case of language littering. However see the GNAT-specific 'Img attribute. For debugging purposes it does not add space where 'Image also for debugging purposes adds! (:-)) As Chairman Mao used to say: "In a word, while the prospects are bright, the road has twists and turns." (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de