From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 101deb,495b037244521cf3 X-Google-Attributes: gid101deb,public X-Google-Thread: 103376,22b2c05a8088bbb2 X-Google-Attributes: gid103376,public 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 Message-ID: <56u4vf$r65$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 197590868 references: <327FB8A3.745B@itg-sepg.logicon.com> <55ubsh$lh0$1@goanna.cs.rmit.edu.au> <56bi13$3pa$1@goanna.cs.rmit.edu.au> <328A0DDD.94B@lmtas.lmco.com> <56rgou$r4k$1@goanna.cs.rmit.edu.au> <56tjrh$4ak$1@goanna.cs.rmit.edu.au> <56trsm$f5a$1@goanna.cs.rmit.edu.au> organization: Comp Sci, RMIT, Melbourne, Australia newsgroups: comp.lang.ada,comp.lang.pl1 nntp-posting-user: ok Date: 1996-11-20T00:00:00+00:00 List-Id: 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.