comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christoph.grein@eurocopter.com>
Subject: Re: Generic 'access-to-subprogram' formal
Date: Sat, 9 Jan 2010 09:03:18 -0800 (PST)
Date: 2010-01-09T09:03:18-08:00	[thread overview]
Message-ID: <86c18193-459f-410f-b7a7-aba62ca03095@k19g2000yqc.googlegroups.com> (raw)
In-Reply-To: 9e0a0ceb-7767-4d36-a29e-a51c23b8a0a6@m3g2000yqf.googlegroups.com

On 9 Jan., 13:20, xorque <xorquew...@googlemail.com> 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);



  reply	other threads:[~2010-01-09 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-09 12:20 Generic 'access-to-subprogram' formal xorque
2010-01-09 17:03 ` AdaMagica [this message]
2010-01-09 18:08   ` xorque
2010-01-09 18:52     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox