comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol+abuse@pvv.org>
Subject: Re: newbie to generic
Date: Fri, 17 May 2002 09:35:09 +0000 (UTC)
Date: 2002-05-17T09:35:09+00:00	[thread overview]
Message-ID: <slrnae9jmd.1qj.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: ac2hbs$ljq$1@newstoo.ericsson.se

On Fri, 17 May 2002 11:13:12 +0200, Sebastian wrote:

> whats wring with this?

First stop posting HTML to a news group. Turn on text only in your
newsreader.

> function To_Add is new =
> System.Address_To_Access_Conversions.To_Address(Procedure_Ptr_Type);

because the package System.Address_To_Access_Conversions is defined as
this (arm95 - 13.7.2):

  generic
     type Object(<>) is limited private;
  package System.Address_To_Access_Conversions
  is
  pragma Preelaborate(Address_To_Access_Conversions);
  type Object_Pointer is access all Object;
  [...]
  function To_Address(Value : Object_Pointer) return Address;
  [...]
  end System.Address_To_Access_Conversions;


This means that you have to do:

   package My_Address_Conversion is 
      new System.Address_To_Access_Conversions (Object => Procedure_Type);

and then you call To_Address like this:

   My_Address_Conversion.To_Address(Procedure_Ptr_Type);

-- 
Preben



       reply	other threads:[~2002-05-17  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ac2hbs$ljq$1@newstoo.ericsson.se>
2002-05-17  9:35 ` Preben Randhol [this message]
2002-05-17 19:40 ` newbie to generic Jeffrey Carter
2002-05-17  9:26 Grein, Christoph
replies disabled

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