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: 103376,9cbcb326ab4299b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Package name as string Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <9IK6p.32469$2t5.26524@newsfe24.ams2> <4d5bac3a$0$7667$9b4e6d93@newsspool1.arcor-online.net> Date: Wed, 16 Feb 2011 14:03:43 +0100 Message-ID: NNTP-Posting-Date: 16 Feb 2011 14:03:43 CET NNTP-Posting-Host: 6c260c05.newsspool4.arcor-online.net X-Trace: DXC=]^o5X:C=]Eg]BlmkiiU@Bi4IUKNLNHdD7:e X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:17297 Date: 2011-02-16T14:03:43+01:00 List-Id: On Wed, 16 Feb 2011 11:51:38 +0100, Georg Bauhaus wrote: > On 16.02.11 09:52, Dmitry A. Kazakov wrote: >> On Wed, 16 Feb 2011 08:06:45 +0100, Per Sandberg wrote: > >> A possible GNAT-independent implementation: >> >> with Ada.Tags; >> >> function Name return String is >> type Dummy is tagged limited null record; >> Result : String := Ada.Tags.Expanded_Name (Dummy'Tag); >> begin >> return Result (Result'First..Result'Last - 11); >> end Name; >> > > This is akin to what Pragmada.Reflection does. > It uses instances of a generic, an abstract type, > and does then not rely on -11. 11 = ".Name.Dummy"'Length -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de