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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9def0a9c238c7bd8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-15 14:35:46 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!195.115.0.4.MISMATCH!esplande3000.net!fr.clara.net!heighliner.fr.clara.net!grolier!btnet-peer0!btnet-peer!btnet!nntp.news.xara.net!xara.net!gxn.net!news.lattis.xara.net!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Ada 0x Wish List Date: Thu, 15 Feb 2001 17:14:13 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <96hkdn$t08$1@nh.pace.co.uk> References: <3A87F362.3B2F6CEE@bton.ac.uk> <7Uti6.95954$Ch.16402642@newsrump.sjc.telocity.net> <96hjjl$e1f$2@a1-hrz.uni-duisburg.de> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 982275319 29704 136.170.200.133 (15 Feb 2001 22:15:19 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 15 Feb 2001 22:15:19 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:5286 Date: 2001-02-15T22:15:19+00:00 List-Id: "Georg Bauhaus" wrote in message news:96hjjl$e1f$2@a1-hrz.uni-duisburg.de... > David C. Hoos, Sr. (david.c.hoos.sr@ada95.com) wrote: > : Ada.Strings.Fixed.Trim (Integer'Image ()) > : will do it without and leading spaces. > > The RM tells me that images of numbers start with a space > or minus sign, and then there is the 'Width attribute so I > can allocate a string big enough for every possible image... > Does someone know some source of information that deals with > the reasons for this choice for 'Image? > > I believe the reasoning behind it was that Ada83 only had strings of fixed length, so you need to be as predictable as possible WRT the size of some string conversion. If you're copying to fixed positions in some sort of output string, you'd like things to align, etc. as well as fitting into a predictable space. Hence the leading blank or minus. Now that Ada95 provides unbounded and bounded strings along with all sorts of clever string manipulation routines, this becomes much less of a concern - but backward compatibility will keep this around no doubt pretty much forever. Personally, I'd rather they had just returned the string without the leading space. 99% of the time, it turns out to be a nuisance that you just work to get rid of anyway. Having Ada stick that space in there for the 1% of the time it might be useful just ends up a waste. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/