From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Parameterised 'Image Attributes
Date: Fri, 25 Aug 2023 09:26:07 +0200 [thread overview]
Message-ID: <uc9l2b$3u0pe$1@dont-email.me> (raw)
In-Reply-To: <d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
On 2023-08-24 21:59, Stephen Davies wrote:
> On Wednesday, 23 August 2023 at 17:16:12 UTC+1, Dmitry A. Kazakov wrote:
>> On 2023-08-23 12:20, Stephen Davies wrote:
>>
>>> Actually, I think it might also be nice if Float'Trim_Image(X) returned
>>> a string that only used exponential notation for very large or very
>>> small values (which seems to be the default behaviour in Python).
>> To use the shortest representation for the given precision unless
>> specified otherwise:
>>
>> http://www.dmitry-kazakov.de/ada/strings_edit.htm#6
>>
>> Ada 'Image attributes have "typographic quality" in plain contradiction
>> to the claim being for debugging purpose. That is why the plus sign is
>> always represented by a space and why floating-point representation is
>> always selected even for exact zero and the way the exponent part is
>> formatted. The typographic idea is to have *same looking* output. Note,
>> even if the output is mathematically incorrect as in the case of
>> floating-point numbers. 'Image considers precision and accuracy same,
>> which is *always* wrong when dealing with floating-point numbers.
>>> Different names would then be needed (Tidy_Image and Tidy_Width?).
>> It takes several parameters to control the behavior in a reasonable way.
>> --
> How about an attribute called something like User_Image
> where programmers should make no assumption about the
> generated strings and implementations can provide
> OS-specific ways to customise things like leading
> space/plus/neither, decimal separator character, digit
> grouping character/spacing, exponential notation, enum
> casing, etc.
How anything can be implemented without making assumptions = specifications?
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2023-08-25 7:26 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 [this message]
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
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