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: 103376,22b2c05a8088bbb2 X-Google-Attributes: gid103376,public X-Google-Thread: 101deb,495b037244521cf3 X-Google-Attributes: gid101deb,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Leading zeros with Int_IO.Put()? Or another package? Date: 1996/11/21 Message-ID: #1/1 X-Deja-AN: 197741222 references: <327FB8A3.745B@itg-sepg.logicon.com> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada,comp.lang.pl1 Date: 1996-11-21T00:00:00+00:00 List-Id: rav@goanna.cs.rmit.edu.au (robin) writes: >Thank you for proving the point! PL/I's > put edit (d) (P'-999,999,999'); >is a lot simpler. In article <56u4vf$r65$1@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes: > NONONONO! It's *SHORTER*, is all. > "Shorter" and "simpler" are very different things. Not even that. It is shorter once in PL/I but embarrassingly longer when you have lots of puts to do. In Ada I typically declare a Put routine for any numeric type, and then just write Put(D); (If D was a meaningful variable name. ;-) There are occasions where you want to use more than one format with a particular type, but this almost always occurs in totalling situations. I prefer even for that case to use two renamings, one as Put one as Put_Total, etc. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...