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.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!timbuk!shamash!case From: case@shamash.cdc.com (Steven V. Case) Newsgroups: comp.lang.ada Subject: Re: integer'image Message-ID: <29979@shamash.cdc.com> Date: 21 Jan 91 19:41:56 GMT References: <2563@sparko.gwu.edu> <10140@as0c.sei.cmu.edu> <13874@encore.Encore.COM> Organization: Control Data, Arden Hills, MN List-Id: In article <13874@encore.Encore.COM>, jcallen@Encore.COM (Jerry Callen) writes: > In article <1991Jan20.025451.29808@ucselx.sdsu.edu> hoysch@ucselx.sdsu.edu ( Hoysch) writes: > > > > I think a big thing is being made out of something that is not very > >hard to do. For example INTEGER'IMAGE(I)(2..INTEGER'IMAGE(I)'LAST) will > >do it or a very simple routine if this is too hard on the eyes. > > It will also chop off the minus sign if the value happens to be negative. > Furthermore, the generated code will almost certainly gag a maggot. I have encountered this situation frequently enough that I work around it by calling a subprogram to strip leading spaces. I suspect that most of you have some sort of string manipulation package that you have either developed or purchased. I made sure that mine has support for removing leading and trailing spaces (in addition to other operations). Then when I want to get rid of the trailing space, 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.' -- ____ ____ Steve Case - HQG526 email: case@shamash.cdc.com / ___||___ \ Control Data Corporation AT&T : (612) 853-3345 | |___ ___| | 3101 East 80th Street \____||____/ Bloomington, MN 55425