comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: ADA and return functions (Strings)
Date: 19 May 2002 07:30:29 -0700
Date: 2002-05-19T14:30:29+00:00	[thread overview]
Message-ID: <5ee5b646.0205190630.237196b3@posting.google.com> (raw)
In-Reply-To: mailman.1021804803.32634.comp.lang.ada@ada.eu.org

"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote in message news:<mailman.1021804803.32634.comp.lang.ada@ada.eu.org>...

> The best way to do this without spaces is something like this:
> 
> return Ada.Strings.Fixed.Trim (Version.Major'img, Ada.Strings.Left) &
>  "." & Ada.Strings.Fixed.Trim (Version.Minor'img, Ada.Strings.Left);

Seems very heavy to drag in the whole of Ada.Strings.Fixed for such a trivial
task, and even heavier to call Trim repeatedly. Why not just write a little
function called Semsible_Image that you then call. Actually you can use the
name Image for this function.

P.S. This was clearly a bad design decision in Ada, it had in mind some kind
of columnar output thought, but that was silly in context. But we are stuck
now because people depend on the existing annoying definition.



  parent reply	other threads:[~2002-05-19 14:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-19  7:20 ADA and return functions (Strings) ProLogic
2002-05-19 10:38 ` David C. Hoos, Sr.
2002-05-19 14:14   ` ProLogic
2002-05-19 14:30   ` Robert Dewar [this message]
2002-05-19 20:23     ` sk
2002-05-20 13:08       ` Marin David Condic
2002-05-21  2:51         ` sk
2002-05-21 10:50           ` John English
2002-05-21 12:52           ` Marin David Condic
2002-05-21 14:39           ` Ted Dennison
2002-05-21 16:27             ` Jean-Pierre Rosen
2002-05-21 20:39             ` sk
     [not found]             ` <3CEAB094.6B9E14F7@myob.com>
2002-05-21 21:07               ` sk
2002-05-21 19:52         ` sk
2002-05-19 20:27     ` David C. Hoos, Sr.
2002-05-20  3:06       ` Robert Dewar
2002-05-20 15:29         ` Kevin Cline
2002-05-20 17:16           ` Larry Kilgallen
2002-05-19 21:06 ` Jeffrey Carter
2002-05-20  1:58   ` tmoran
2002-05-20  2:28     ` David C. Hoos, Sr.
2002-05-20  3:05       ` tmoran
2002-05-20  3:35         ` David C. Hoos, Sr.
replies disabled

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