comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GtkAda Problem
Date: Mon, 19 Jul 2004 18:55:28 -0500
Date: 2004-07-19T18:55:28-05:00	[thread overview]
Message-ID: <G4CdnVtW_O3XwmHd4p2dnA@megapath.net> (raw)
In-Reply-To: opsba3palkp4pfvb@bram-2

"Nick Roberts" <nick.roberts@acm.org> wrote in message
news:opsba3palkp4pfvb@bram-2...
> On Sat, 17 Jul 2004 22:40:16 GMT, Jeffrey Carter <spam@spam.com> wrote:
>
> > Nick Roberts wrote:
> >
> >> If it is possible to move fidle to a library-level package, fine. But
> >> if it would be impractical to do so, I suspect using Unchecked_Access
> >> is the best bet.
> >
> > 'Unchecked_Access is not defined for subprograms.
>
> Silly me. You're right. The weird thing is that I've used Unchecked_Access
> with GNAT (interfacing to Windows). I guess GNAT just allows it. Or was it
> Unchecked_Address? My memory is not very good. I'm very sorry for any
> confusion caused.
>
> I think compilers should provide a non-standard mode permitting
> Unchecked_Access for subprograms, since it's obviously needed sometimes;
> this mode would be forbidden for safety-critical software.

The Amendment provides anonymous access-to-subprogram types for this
purpose. (They can't be mixed with named access-to-subprogram types to avoid
problems). That would be the best way to solve this problem. Of course,
you'd need an Ada 2005 compiler. (Note that the containers library uses
anonymous access-to-subprogram rather than a generic to implement iterators,
so this will show up sooner rather than later in compilers.)

             Randy.






  parent reply	other threads:[~2004-07-19 23:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-17 16:05 GtkAda Problem Oliver Doerler
2004-07-17 16:11 ` Sorry wrong Def.! Oliver Doerler
2004-07-17 17:38 ` GtkAda Problem Björn Persson
2004-07-17 20:00   ` Nick Roberts
2004-07-17 22:40     ` Jeffrey Carter
2004-07-18  0:01       ` Nick Roberts
2004-07-18 11:29         ` Simon Wright
2004-07-18 14:17           ` Nick Roberts
2004-07-19 19:55             ` Warren W. Gay VE3WWG
2004-07-19 21:58               ` Ludovic Brenta
2004-07-19 22:59                 ` Ed Falis
2004-07-20 16:58                 ` Warren W. Gay VE3WWG
2004-07-20 18:14               ` Nick Roberts
2004-07-19 23:55         ` Randy Brukardt [this message]
2004-07-17 17:44 ` Nick Roberts
2004-07-21 20:15 ` Oliver Doerler
  -- strict thread matches above, loose matches on Subject: below --
2003-01-07 11:45 gtkada problem Evangelista Sami
2003-01-07 18:46 ` Stephen Leake
replies disabled

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