comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Subject: Re: Parameterised 'Image Attributes
Date: Fri, 18 Aug 2023 11:53:44 -0700	[thread overview]
Message-ID: <87pm3ki3lz.fsf@nosuchdomain.example.com> (raw)
In-Reply-To: ubn5un$5tvt$1@dont-email.me

Rod Kay <rodakay5@gmail.com> writes:
>    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).

TeleSoft's compiler (which I worked on) had 'Extended_Image and
'Extended_Value attributes that worked like that.  I found them quite
useful -- especially as an easy way to drop the leading space on
Integer'Image.

One small problem was that we had different parameters for integer
and enumeration types, which introduced an ambiguity for discrete
formal types.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

  parent reply	other threads:[~2023-08-18 18:53 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  7:18 Parameterised 'Image Attributes Rod Kay
2023-08-18  8:25 ` Luke A. Guest
2023-08-19  9:14   ` J-P. Rosen
2023-08-19 10:03     ` Dmitry A. Kazakov
2023-08-19 11:45       ` Luke A. Guest
2023-08-19 11:56       ` J-P. Rosen
2023-08-19 13:01         ` Dmitry A. Kazakov
2023-08-19 15:27     ` Jeffrey R.Carter
2023-08-20  7:53       ` G.B.
2023-08-20  9:27         ` Dmitry A. Kazakov
2023-08-21 23:11           ` Randy Brukardt
2023-08-21 23:37           ` Randy Brukardt
2023-08-22  7:38             ` Dmitry A. Kazakov
2023-08-19 16:49     ` moi
2023-08-20  7:25       ` Randy Brukardt
2023-08-20  9:43         ` Dmitry A. Kazakov
2023-08-21 23:34           ` Randy Brukardt
2023-08-22  8:13             ` Dmitry A. Kazakov
2023-08-23 10:20               ` Stephen Davies
2023-08-23 16:16                 ` Dmitry A. Kazakov
2023-08-24 19:59                   ` Stephen Davies
2023-08-25  7:26                     ` Dmitry A. Kazakov
2023-08-25  9:04                       ` Stephen Davies
2023-08-25 13:02                         ` Dmitry A. Kazakov
2023-08-28  9:18                           ` Stephen Davies
2023-08-28 10:58                             ` Dmitry A. Kazakov
2023-08-28 15:42                               ` Stephen Davies
2023-08-28 16:09                                 ` Dmitry A. Kazakov
2023-08-28 17:33                                   ` G.B.
2023-08-28 19:08                                     ` Dmitry A. Kazakov
2023-08-28 17:58                               ` Niklas Holsti
2023-08-28 19:08                                 ` Dmitry A. Kazakov
2023-09-07  1:04                               ` Randy Brukardt
2023-09-07  9:01                                 ` Dmitry A. Kazakov
2023-08-18 18:53 ` Keith Thompson [this message]
2023-09-23 10:00 ` Rod Kay
2023-09-26  5:47   ` Vadim Godunko
2023-09-26 10:15     ` Rod Kay
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox