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=2.1 required=5.0 tests=BAYES_05,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool2.mu.edu!sdd.hp.com!wuarchive!hsdndev!husc6!encore!jcallen From: jcallen@Encore.COM (Jerry Callen) Newsgroups: comp.lang.ada Subject: Re: integer'image Summary: it's STILL baloney Message-ID: <13879@encore.Encore.COM> Date: 21 Jan 91 21:54:23 GMT References: <2563@sparko.gwu.edu> <10140@as0c.sei.cmu.edu> <13874@encore.Encore.COM> <29979@shamash.cdc.com> Reply-To: jcallen@encore.Com (Jerry Callen) Organization: Encore Computer Corp, Marlboro, MA List-Id: In article <29979@shamash.cdc.com> case@shamash.cdc.com (Steven V. Case) writes: >[various quoted material deleted; essentially, a routine to stripped > leading spaces can be used to trim the leading blank from the > result of integer'IMAGE on positive integers. Then...] > >... I don't have to embed statements >like INTEGER'IMAGE(I)(2..INTEGER'IMAGE(I)'LAST), but can use a statement >such as REMOVE_LEADING_SPACES(FROM => INTEGER'IMAGE(I)). This is probably >more readable, therefore it won't 'gag a maggot'. I suspect this is the >general idea that Mr. Hoysch was suggesting when he said 'or a very simple >routine if this is too hard on the eyes.' I wasn't complaining about Ada code readability; sure you can hide the ugliness of INTEGER'IMAGE(I)(2..INTEGER'IMAGE(I)'LAST) behind a procedure call. I meant that the _code out of the compiler_ will be hideous; two calls to integer'IMAGE, one to 'LAST, then a slicing operation. Yuch. It's this sort of thing that makes C programmers look at Ada and throw up their hands in despair. [Don asbestos suit...] I hate to admit it, but I'd really love an Ada equivalent of printf that takes some nice formatting string and some variables to be printed and then does the right thing. Occasionally (NOT very often...) strong typing is a real pain in the buns. -- Jerry Callen jcallen@encore.com P.S. No, I'm not a C bigot; in fact, most C code is hideous enough to, well, to gag a maggot. :-)