comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Garlington <garlingtonke@lmtas.lmco.com>
Subject: Re: Leading zeros with Int_IO.Put()? Or another package?
Date: 1996/12/02
Date: 1996-12-02T00:00:00+00:00	[thread overview]
Message-ID: <32A2BDF3.53A0@lmtas.lmco.com> (raw)
In-Reply-To: AEC262BB96688260@mcdialb11.it.luc.edu


Verne Arase wrote:
> 
> In article <3295F2A9.1EF0@lmtas.lmco.com>,
> Ken Garlington <garlingtonke@lmtas.lmco.com> wrote:
> 
>  >  use Ada.Text_IO.Editing;
>  >  ...
>  >  package Edited_IO is new Decimal_Output (type);
>  >  ...
>  >  Edited_IO.Put (n, To_Picture ("-99999999"));
>  >
>  >Interesting. They look reasonably similar to me. If anything,
>  >the Ada version makes it clear from the text that this
>  >I/O is using the Picture feature of the language. However,
>  >if you believe "P" is more readable in this regard, I
>  >suppose we'll have to agree to disagree...
> 
> Well, we are talking about a langugage primative rather than a subroutine
> library.

I'm not sure what a "language primitive" is, but any Ada compiler that implements
the Information Systems annex of the Ada standard (ISO/IEC 8652:1995) will support
the three lines written above (which can also be re-written as two slightly longer
lines, if desired). Specifically, the generic package
Ada.Text_IO.Editing.Decimal_Output is supplied by the compiler, just as the body of
SQRT would be provided (via a subroutine library, in many cases) by most FORTRAN
compilers.

The only definitions supplied by the user in this case, other than the lines
shown above, are "n" and "type", which refer to the value to be formatted and
its type, respectively.

Assuming that a generic package supplied by the compiler does not meet your
definition of a "language primitive," what's the relevance of this to the lines
you quoted? Is there a language design philosophy for PL/I that says "language 
primitives" should be very terse? Is this in the standard somewhere?

> Or are you saying that PayRoll is also built into the language (and
> implemented in a single statement)?

Since I don't know to what "PayRoll" you are referring, I certainly would
not claim it is part of the Ada language (or any other language :). I would
say something is "built into" the language if it is defined by the language
specification. For Ada.Text_IO.Editing.Decimal_Output, this is the case. See

  http://www.adahome.com/rm95/rm9x-F-03.html

"Edited Output for Decimal Types," in the on-line version of the Ada standard.

(By the way, is there an equivalent on-line version of the ISO PL/I standard?)

-- 
LMTAS - "Our Brand Means Quality"
For more info, see http://www.lmtas.com or http://www.lmco.com




  reply	other threads:[~1996-12-02  0:00 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-05  0:00 Leading zeros with Int_IO.Put()? Or another package? J.D. Baldwin
1996-11-05  0:00 ` Samuel Tardieu
1996-11-05  0:00 ` David Shochat
1996-11-08  0:00   ` robin
1996-11-08  0:00     ` Ken Garlington
1996-11-08  0:00     ` Robert Dewar
1996-11-10  0:00       ` Verne Arase
1996-11-13  0:00       ` robin
1996-11-13  0:00         ` Ken Garlington
1996-11-19  0:00           ` robin
1996-11-19  0:00             ` Robert Dewar
1996-11-20  0:00             ` Norman H. Cohen
1996-11-20  0:00             ` Richard A. O'Keefe
1996-11-20  0:00               ` robin
1996-11-20  0:00                 ` Robert Dewar
1996-11-22  0:00                   ` Richard A. O'Keefe
1996-11-25  0:00                   ` shmuel
1996-11-20  0:00                 ` Richard A. O'Keefe
1996-11-22  0:00                   ` robin
1996-11-22  0:00                     ` Richard A. O'Keefe
1996-11-23  0:00                       ` robin
1996-11-20  0:00                 ` Larry J. Elmore
1996-11-25  0:00                   ` robin
1996-11-25  0:00                     ` Robert Dewar
1996-11-26  0:00                     ` Larry J. Elmore
1996-11-21  0:00                 ` Jerry Coffin
1996-11-22  0:00                 ` Ken Garlington
1996-11-20  0:00               ` Robert Dewar
1996-11-22  0:00             ` Ken Garlington
1996-11-27  0:00               ` Verne Arase
1996-12-02  0:00                 ` Ken Garlington [this message]
     [not found]             ` <56tjrh$4a <MPLANET.3294c204jcoffin989a3e@news.rmi.net>
1996-11-24  0:00               ` Bert
1996-11-13  0:00       ` robin
1996-11-13  0:00         ` Ken Garlington
1996-11-19  0:00           ` robin
1996-11-22  0:00             ` Ken Garlington
1996-11-22  0:00             ` Robert Dewar
1996-11-17  0:00         ` Robert Dewar
1996-11-21  0:00   ` Robert I. Eachus
1996-11-22  0:00     ` robin
1996-11-06  0:00 ` Norman H. Cohen
1996-11-07  0:00   ` Pascal Obry
1996-11-07  0:00     ` Norman H. Cohen
1996-11-08  0:00   ` Norman H. Cohen
1996-11-09  0:00     ` Robert Dewar
1996-11-06  0:00 ` Stephen Leake
1996-11-06  0:00 ` Robert I. Eachus
1996-11-08  0:00   ` Norman H. Cohen
1996-11-08  0:00 ` David Emery
1996-11-24  0:00 ` Fergus Henderson
1996-11-24  0:00   ` Robert Dewar
1996-11-25  0:00     ` J. David Bryan
1996-11-25  0:00     ` Larry Kilgallen
1996-11-27  0:00     ` Verne Arase
1996-11-28  0:00   ` Richard A. O'Keefe
  -- strict thread matches above, loose matches on Subject: below --
1996-12-15  0:00 Robert Dewar
1996-11-05  0:00 Collection of 2500+ links about Object-Orientation - interested ? Manfred Schneider
1996-11-07  0:00 ` Leading zeros with Int_IO.Put()? Or another package? John Herro
1996-11-07  0:00   ` James Rogers
1996-11-07  0:00   ` Robert Dewar
replies disabled

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