From: Sven <sven.weidauer@gmail.com>
Subject: Re: How to pass around access types to interfaces?
Date: Fri, 24 Oct 2008 05:49:36 -0700 (PDT)
Date: 2008-10-24T05:49:36-07:00 [thread overview]
Message-ID: <a2040b62-aea2-4696-b70b-bcfe121cd82c@17g2000hsk.googlegroups.com> (raw)
In-Reply-To: 4901be81$0$23607$4f793bc4@news.tdc.fi
> I assume this type declaration is in the main *procedure*. This
> means that the type has a local scope and life, which prevents
> converting its values to a more long-lived access type. Try
> declaring Concrete_Type in a package; that makes it live as long as
> the whole program, and should allow such conversions.
Yeah, the declaration was in the main procedure. When moving it to a
package everything works like it's supposed to. Thanks for your help.
I guess I have still a lot to learn about Ada. I was just thinking
about the lifetime of the object. It never occured to me that a type
also has a lifetime.
next prev parent reply other threads:[~2008-10-24 12:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 11:45 How to pass around access types to interfaces? Sven
2008-10-24 12:24 ` Niklas Holsti
2008-10-24 12:49 ` Sven [this message]
2008-10-24 13:55 ` Ludovic Brenta
2008-10-24 21:32 ` sjw
2008-10-25 8:54 ` Sven
2008-10-25 15:43 ` Martin Krischik
2008-10-25 22:15 ` Robert A Duff
2008-10-26 8:02 ` Dmitry A. Kazakov
2008-10-26 15:50 ` Martin Krischik
2008-10-28 13:41 ` Maciej Sobczak
2008-10-29 14:15 ` Martin Krischik
2008-10-31 13:38 ` Maciej Sobczak
2008-10-31 14:46 ` Dmitry A. Kazakov
2008-10-29 12:42 ` Sven
2008-10-29 13:17 ` 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