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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,9a3da26ec7b587c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!k17g2000yqh.googlegroups.com!not-for-mail From: xorque Newsgroups: comp.lang.ada Subject: Re: Generic 'access-to-subprogram' formal Date: Sat, 9 Jan 2010 10:08:20 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <9e0a0ceb-7767-4d36-a29e-a51c23b8a0a6@m3g2000yqf.googlegroups.com> <86c18193-459f-410f-b7a7-aba62ca03095@k19g2000yqc.googlegroups.com> NNTP-Posting-Host: 78.143.195.33 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1263060501 1284 127.0.0.1 (9 Jan 2010 18:08:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 9 Jan 2010 18:08:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k17g2000yqh.googlegroups.com; posting-host=78.143.195.33; posting-account=D9GNUgoAAAAmg7CCIh9FhKHNAJmHypsp User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.5) Gecko/20091127 Firefox/3.5.5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8692 Date: 2010-01-09T10:08:20-08:00 List-Id: On Jan 9, 5:03=A0pm, AdaMagica wrote: > > generic > =A0 type Some_Type is private; > =A0 type Acc_Proc =A0is access procedure (A: Some_Type); Thanks. I suppose it's not possible to be less specific? dlopen()-like functions might return a pointer to any type of subprogram, so I'd want to do something like: generic type Subprogram_Access_Type is access private; function Load_Subprogram (Name : in String) return Subprogram_Access_Type; I don't see anything in the RM that might accommodate this. The Load_Subprogram doesn't need to know anything about the type other than the fact that it's an access to something. I have a feeling I'm going to be unsafely converting a System.Address...