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: 103376,26a21b9e317dc639 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.80.8 with SMTP id n8mr3737301pax.17.1353426753095; Tue, 20 Nov 2012 07:52:33 -0800 (PST) Received: by 10.50.37.232 with SMTP id b8mr3898119igk.4.1353426753027; Tue, 20 Nov 2012 07:52:33 -0800 (PST) Path: s9ni239pbb.0!nntp.google.com!kr7no2106531pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 20 Nov 2012 07:52:32 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: <9b0bcb37-8ae3-440f-af4f-a796702e4250@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Access type to member procedure of instance (Object Oriented programming in Ada) From: Adam Beneschan Injection-Date: Tue, 20 Nov 2012 15:52:33 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-11-20T07:52:32-08:00 List-Id: On Tuesday, November 20, 2012 3:28:07 AM UTC-8, Brian Drummond wrote: > On Mon, 19 Nov 2012 17:59:06 -0600, Randy Brukardt wrote: > > > The "name" (Ada synax terminology) "Message.Print" represents a > > parameterless procedure, and can be used in the same way as other > > parameterless procedures. In particular, it can be renamed as a > > parameterless procedure: > > > procedure P renames Message.Print; > > ... > > procedure Main is > Message : Some_Package.Message_Type; > procedure P renames Message.Print; > begin > Message.Print; > P; > end Main; > > ... > ./main > Hello > Hello > > Damn that's nice! > > Where's the upvote button on this thing? Fortunately, we don't have one. By the way, you cannot rename Message.Print with a "renaming-as-body". -- Adam