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.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Thu, 6 May 2010 21:20:46 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <1ojboulapml8w$.1w5gfpk45kh72.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1273198851 7171 69.95.181.76 (7 May 2010 02:20:51 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 7 May 2010 02:20:51 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:11352 Date: 2010-05-06T21:20:46-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1ojboulapml8w$.1w5gfpk45kh72.dlg@40tude.net... > On Thu, 06 May 2010 16:22:03 -0400, Robert A Duff wrote: > >> Warren writes: >> >>> I agree that it is indeed clumsier. It's just that >>> I tend to use it a lot in debug output, rather than >>> chasing down the package prefix for the To_String() >>> function. I know I can always get away with: >>> >>> Put_Line("The value V=" & T'Image(V)); >> >> I don't understand that. You need to chase down the package >> in which T is declared, which is the same package in which >> To_String (or better, Image) is declared. > > I always declare I/O/formatting stuff in a child package. So, T'Image has > some minor advantages. (The argument would really work if it were V'Image > or V.Image) Except that you can't specify an attribute of a type after it is frozen. So if you could specify T'Image, you couldn't define the Image function that you specified in a child package. Thus Bob is right: the type and the function has to be in the same package. (Well, I guess you could use some other subtype that is declared somewhere else as the prefix. Not sure that helps much.) Randy.