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,9a3da26ec7b587c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k19g2000yqc.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Generic 'access-to-subprogram' formal Date: Sat, 9 Jan 2010 09:03:18 -0800 (PST) Organization: http://groups.google.com Message-ID: <86c18193-459f-410f-b7a7-aba62ca03095@k19g2000yqc.googlegroups.com> References: <9e0a0ceb-7767-4d36-a29e-a51c23b8a0a6@m3g2000yqf.googlegroups.com> NNTP-Posting-Host: 91.13.237.154 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1263056598 7224 127.0.0.1 (9 Jan 2010 17:03:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 9 Jan 2010 17:03:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k19g2000yqc.googlegroups.com; posting-host=91.13.237.154; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8691 Date: 2010-01-09T09:03:18-08:00 List-Id: On 9 Jan., 13:20, xorque wrote: > Hello. > > I'm attempting to write a generic wrapper around a C function > that acts similarly to dlopen(). > > What's the correct way to specify that a generic takes an > access-to-subprogram type as a formal parameter? Ada Reference Manual 12.5.4: formal_access_type_definition ::= access_type_definition 3.10: access_type_definition ::= [null_exclusion] access_to_object_definition | [null_exclusion] access_to_subprogram_definition 3.10: access_to_subprogram_definition ::= access [protected] procedure parameter_profile | access [protected] function parameter_and_result_profile For Instance: generic type Some_Type is private; type Acc_Proc is access procedure (A: Some_Type);