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=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:6404:b0:76f:17db:6fc5 with SMTP id pz4-20020a05620a640400b0076f17db6fc5mr24290qkn.10.1693214317686; Mon, 28 Aug 2023 02:18:37 -0700 (PDT) X-Received: by 2002:a81:a845:0:b0:58c:b5a4:8e1f with SMTP id f66-20020a81a845000000b0058cb5a48e1fmr918196ywh.3.1693214317496; Mon, 28 Aug 2023 02:18:37 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 28 Aug 2023 02:18:37 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=205.239.40.3; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl NNTP-Posting-Host: 205.239.40.3 References: <4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Parameterised 'Image Attributes From: Stephen Davies Injection-Date: Mon, 28 Aug 2023 09:18:37 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:65565 List-Id: On Friday, 25 August 2023 at 14:02:57 UTC+1, Dmitry A. Kazakov wrote: > On 2023-08-25 11:04, Stephen Davies wrote: > The proposal was to add parameters defaulted to the existing behavior. > Year'Image (Plus=>None,Width=>4,Alignment=>Right,Padding=>'0') > > > So the programmer could use 'User_Image to generate a display string > > that will be formatted to the users preferences without knowing > > (or being able to make assumptions about) those preferences, > > e.g. Put_Line ("The result is " & Result'User_Image) > This will be rejected on the same grounds as the original proposal. > Read Randy's response. I did read Randy's response, he explained the difficulty in adding parameters to '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.