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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news-2.dfn.de!news.dfn.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Fri, 7 May 2010 10:12:16 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <2318cabb-080c-42a0-8219-21c347abe172@o11g2000yqj.googlegroups.com> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: tigger.scc.uni-weimar.de 1273216769 16085 141.54.178.228 (7 May 2010 07:19:29 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Fri, 7 May 2010 07:19:29 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: Xref: g2news2.google.com comp.lang.ada:11354 Date: 2010-05-07T10:12:16+02:00 List-Id: On Thu, 6 May 2010, Warren wrote: > I'm just being a typical lazy programmer (not always > wanting to lookup the correct package prefix for > the To_String() function to use). How about overloading the &-operator: function "&"(S: String; Item: T) return String; if X is of type T and you "use type T", you can replace the expression T'Image(X) by "" & X If your T'Image(X) is part of a larger string expression, overloading & appears to be very convenient (for the "typical lazy programmer", as you put it): Ada.Text_IO.Put_Line("The first result is " & X & " the second result is " & Y & "."); So long Stefan -- ------ Stefan Lucks -- Bauhaus-University Weimar -- Germany ------ Stefan dot Lucks at uni minus weimar dot de ------ I love the taste of Cryptanalysis in the morning! ------