comp.lang.ada
 help / color / mirror / Atom feed
From: pattis@cs.washington.edu (Richard Pattis)
Subject: Re: integer'image
Date: 22 Jan 91 21:37:18 GMT	[thread overview]
Message-ID: <14613@june.cs.washington.edu> (raw)
In-Reply-To: 2584@sparko.gwu.edu

And add a parameter that allows padding to be a ' ' or '0' or any other
aribtrary character. For printing times, I want 12:05:07.

I think what this series of posts finally has lead to the conclusion
that everyone wants slightly different variants of the  INTEGER => STRING
conversion function.  All can be written easily, given INTEGER'IMAGE; yes,
some might be written a bit more easily if the ' ' wasn't added at the
front of non-negative numbers (but I don't claim to have any arguments
for or against).

This "problem" disappears one abstraction level up.  I can't think of
the last time I used INTEGER'IMAGE in my code (I mostly use an overloaded
& to catenate strings and numeric values, or when special formatting is
required, my own formatting routines).

I don't care what INTEGER'IMAGE does; it might be useful to have a nice
package of INTEGER => STRING functions, including conversions to roman
numerals and english: "XXVII" and "TWENTY SEVEN".

Let's get back to convincing Ada compiler developers that they can all
get rich by selling cheaply priced student compilers (and then make even
more money by selling these students special packages that perform such
conversions).

Rich Pattis

  reply	other threads:[~1991-01-22 21:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2563@sparko.gwu.edu>
1991-01-18 19:13 ` integer'image Arthur Evans
1991-01-18 20:32   ` integer'image Michael Feldman
1991-01-20  2:54   ` integer'image       Hoysch
1991-01-20 23:10     ` integer'image Michael Feldman
1991-01-21 15:23     ` integer'image Jerry Callen
1991-01-21 19:41       ` integer'image Steven V. Case
1991-01-21 21:54         ` integer'image Jerry Callen
1991-01-22 19:21         ` integer'image Michael Feldman
1991-01-22 21:37           ` Richard Pattis [this message]
1991-01-23 16:29             ` integer'image Michael Feldman
1991-01-18 23:05 ` integer'image (George C. Harrison) Norfolk State University
1991-01-19 10:51 ` integer'image Jean Pierre Rosen
1991-01-28  3:27 integer'image Jim West (Stealth Contractor)
1991-01-28 15:04 ` integer'image Michael Feldman
1991-01-28 23:09   ` integer'image (George C. Harrison) Norfolk State University
1991-01-29 19:55     ` integer'image stephen edwards
  -- strict thread matches above, loose matches on Subject: below --
2000-04-17  0:00 integer'image NANCY HEHIR
2000-04-17  0:00 ` integer'image tmoran
2000-04-17  0:00 ` integer'image Ted Dennison
2000-04-18  0:00   ` integer'image Marin D. Condic
2000-04-18  0:00     ` integer'image Ted Dennison
2000-04-18  0:00       ` integer'image Marin D. Condic
2000-04-19  0:00 ` integer'image MaggieJohn
replies disabled

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