comp.lang.ada
 help / color / mirror / Atom feed
From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: Leading zeros with Int_IO.Put()? Or another package?
Date: 1996/11/20
Date: 1996-11-20T00:00:00+00:00	[thread overview]
Message-ID: <56u4vf$r65$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 56trsm$f5a$1@goanna.cs.rmit.edu.au


rav@goanna.cs.rmit.edu.au (robin) writes:

>Now why would you bury a picture specification in a remote place from 
>the output statement that uses it?

In order to be close to the *variable declarations* it will be used with.

"Magic numbers" do not appear in well written code.
"Magic strings" do not appear in well written code.
"Magic pictures" do not appear in well written code.


>	>I note that Ada 95 makes it pretty easy to read a picture from a file,
>	>or compute on on the fly by some other method.

>A facility that's available in IBM's PL/I for OS/2, Windows 95/NT and
>AIX.

To borrow the stick you beat Ada with,
"in short, where it's implemented".

>	>ONCE somewhere in a program (probably written by someone else) and
>	>then doing
>	>	Put(Decimal_Integer(X), To_Picture("-999_999_999"));
>	>or whatever.  

>Thank you for proving the point!  PL/I's

>   put edit (d) (P'-999,999,999');

>is a lot simpler.

NONONONO!  It's *SHORTER*, is all.
"Shorter" and "simpler" are very different things.

>What's more, you don't have to hunting for
>Decimal_Integer to find out what it does.

Well, you don't have to go *hunting* for Decimal_Integer in Ada,
either, because the name truthfully _says_ what it is, and any
decent Ada system (like GNAT) will give you the tools you need
to say "where's _that_ defined?".

>P.S. Check out PL/I's drifting user-specifiable currency symbols etc
>for picture editing.  Great fun!

Ada pictures also provide user-specifiable currency symbols,
and they can float.  Have _you_ checked out the on-line free
Ada 96 manual here?  (Is there a free complete current PL/I
reference manual you can be put on-line without paying royalties?)

-- 
Mixed Member Proportional---a *great* way to vote!
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.




  parent reply	other threads:[~1996-11-20  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             ` Richard A. O'Keefe
1996-11-20  0:00               ` Robert Dewar
1996-11-20  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-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 [this message]
1996-11-22  0:00                   ` robin
1996-11-22  0:00                     ` Richard A. O'Keefe
1996-11-23  0:00                       ` robin
1996-11-21  0:00                 ` Jerry Coffin
1996-11-22  0:00                 ` Ken Garlington
1996-11-20  0:00             ` Norman H. Cohen
1996-11-22  0:00             ` Ken Garlington
1996-11-27  0:00               ` Verne Arase
1996-12-02  0:00                 ` Ken Garlington
     [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     ` Larry Kilgallen
1996-11-25  0:00     ` J. David Bryan
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-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   ` Robert Dewar
1996-11-07  0:00   ` James Rogers
1996-12-15  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