comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: How to get this space away?
Date: Wed, 03 Jun 2015 22:50:03 +0200
Date: 2015-06-03T22:50:03+02:00	[thread overview]
Message-ID: <mknp7j$4s1$1@dont-email.me> (raw)
In-Reply-To: <0b23f4af-9a55-4d1d-be90-f74b316a95cf@googlegroups.com>

Le 03/06/2015 21:07, Laurent a écrit :
> On Wednesday, June 3, 2015 at 12:28:34 AM UTC+2, Jeffrey R. Carter wrote:
> 
>> >'Image always adds a leading space
>> > for a non-negative value. Nobody seems to like it, but the ARG won't change it.
> Does the ARG give a reason for not wanting to change it? Does that mean that in the
> case of a negative value you have to add it yourself? Doesn't really make sense.
> 
This dates back to Ada83. The initial idea was that a positive number
and its opposite (negative) number should have the same number of
characters. Forcing a '+' to all positive number would not have been
pretty, so the design team chose to put a space for positive numbers
(negative numbers just have an initial '-').

At first, it looked like a good idea, especially since 'Image was not
intended to be used extensively, but just for debugging purposes. For
IOs, people are supposed to use Text_IO, which provides all the desired
formatting. In practice, it turned out to be a bad idea, and lots of
programs have some functions to remove the initial space - and now,
changing that would break all these programs. And the ARG is very picky
about upward compatibility.

The only possibility would be to define a new attribute. Small effort,
small value.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr


  reply	other threads:[~2015-06-03 20:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 20:32 How to get this space away? Laurent
2015-06-02 20:53 ` Simon Wright
2015-06-03 18:59   ` Laurent
2015-06-03 19:30     ` Simon Wright
2015-06-02 22:28 ` Jeffrey R. Carter
2015-06-03 19:07   ` Laurent
2015-06-03 20:50     ` J-P. Rosen [this message]
2015-06-03 23:00       ` Randy Brukardt
2015-06-05  9:26         ` Stephen Davies
2015-06-08 12:33         ` Brad Moore
2015-06-08 19:47           ` Randy Brukardt
2015-06-08 20:25             ` Jeffrey R. Carter
2015-06-09 14:38               ` Brad Moore
2015-06-04  9:37       ` Georg Bauhaus
2015-06-04 12:32         ` Dmitry A. Kazakov
2015-06-05 13:02       ` Laurent
2015-06-06  0:02         ` Dennis Lee Bieber
2015-06-03  7:28 ` Dmitry A. Kazakov
2015-06-03 19:19   ` Laurent
2015-06-08 22:43 ` wowwomenonwheels205
replies disabled

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