comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Initializers
Date: Wed, 20 Dec 2006 11:35:13 +0100
Date: 2006-12-20T11:35:06+01:00	[thread overview]
Message-ID: <ivy6xchttr41.qpo5h9c4g12r$.dlg@40tude.net> (raw)
In-Reply-To: 1166580131.054327.67090@80g2000cwy.googlegroups.com

On 19 Dec 2006 18:02:11 -0800, markww wrote:

> 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?

They exist, the things they do Ada reference manual calls "package
elaboration." You can attach your code to elaboration in many ways. Begin
in the package body was already mentioned. Then of course all initialized
objects declared in the package are initialized during elaboration. For
example, constants take values, tasks start, controlled objects get their
Initialize called etc. 

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2006-12-20 10:35 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 ` Initializers Martin Krischik
2006-12-20 10:35 ` Dmitry A. Kazakov [this message]
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