From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Initializers
Date: Wed, 20 Dec 2006 07:57:45 +0100
Date: 2006-12-20T07:57:45+01:00 [thread overview]
Message-ID: <1241851.bSEm0EZDxM@linux1.krischik.com> (raw)
In-Reply-To: 1166580131.054327.67090@80g2000cwy.googlegroups.com
markww wrote:
> Hi everyone,
>
> I'm trying to compare C++ to Ada. I'm looking specifically at Ada's
> lack of 'initializers'. I am guessing that this means there is no
> 'constructor' to Ada packages maybe? If that's the case - where do you
> initialize anything that needs setup when it comes into existence?
You should be aware that the language features are distributed differently
between namespaces/packages and classes/tagged-types in Ada/C++. Try
reading:
http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation
http://en.wikibooks.org/wiki/Ada_Programming/Packages
Mind you, the "Packages" chapter is missing the part for initialisation.
Larry allready told you how to perform simple package initialisation - for
more complex needs packages can have a body - just like a procedure.
For tagged type you might also want to check out the package
Ada.Finalisation - despise the name it also handles initialisation and copy
construction.
Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
next prev parent reply other threads:[~2006-12-20 6:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-20 2:02 Initializers markww
2006-12-20 4:52 ` Initializers Larry Kilgallen
2006-12-20 7:59 ` Initializers Jean-Pierre Rosen
2006-12-20 6:57 ` Martin Krischik [this message]
2006-12-20 10:35 ` Initializers Dmitry A. Kazakov
2006-12-20 15:08 ` Initializers Georg Bauhaus
2006-12-20 20:59 ` Initializers markww
2006-12-21 5:14 ` AW: Initializers Grein, Christoph (Fa. ESG)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox