comp.lang.ada
 help / color / mirror / Atom feed
* Elaboration Schmelaboration...
@ 2002-06-27  8:46 David Rasmussen
  2002-06-27 13:34 ` Georg Bauhaus
  0 siblings, 1 reply; 5+ messages in thread
From: David Rasmussen @ 2002-06-27  8:46 UTC (permalink / raw)


Eh... What is elaboration? Can it be explained in C++ terms?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Elaboration Schmelaboration...
@ 2002-06-27  8:58 Grein, Christoph
  2002-06-28 12:57 ` Marin David Condic
  0 siblings, 1 reply; 5+ messages in thread
From: Grein, Christoph @ 2002-06-27  8:58 UTC (permalink / raw)


> Eh... What is elaboration? Can it be explained in C++ terms?

Not knowing C++, I'll use Ada terminology :-b

A program as a whole is executed. A program consists of declarations, statements 
and expressions. Execution of each of these parts has a special name:

Declarations are elaborated.
Statements are executed.
Expressions are evaluate.

Thus a declarative part is elaborated, the following is done (in the sequence 
defined in the RM):

Storage is allocated for the local variables, explicit or implicit initial 
values are assigned to them, local tasks are started, etc...

Since initial values are expressions, all kinds of other program units may be 
called. This is the infamous elaboration sequence problem when circularities are 
detected.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Elaboration Schmelaboration...
  2002-06-27  8:46 David Rasmussen
@ 2002-06-27 13:34 ` Georg Bauhaus
  0 siblings, 0 replies; 5+ messages in thread
From: Georg Bauhaus @ 2002-06-27 13:34 UTC (permalink / raw)


David Rasmussen <pinkfloydhomer@yahoo.com> wrote:
: Eh... What is elaboration? Can it be explained in C++ terms?

There are explanations/examples in the GNAT users guide.
See "Elaboration Order Handling in GNAT."
-- Georg



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Elaboration Schmelaboration...
  2002-06-27  8:58 Elaboration Schmelaboration Grein, Christoph
@ 2002-06-28 12:57 ` Marin David Condic
  2002-06-29  0:15   ` Ted Dennison
  0 siblings, 1 reply; 5+ messages in thread
From: Marin David Condic @ 2002-06-28 12:57 UTC (permalink / raw)


O.K., but C++ also has declarations, so there *is* an analogy. Granted, the
whole scheme of things is dramatically different, (Header files don't
actually "execute" and inclusion of such things is lexical inclusion, etc.)
but you can see the same sort of things happening. When declaring an object
of a given class, space is allocated, its constructors are executed, etc.
That would be "elaboration" in a broad sense of the word.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Grein, Christoph" <christoph.grein@eurocopter.com> wrote in message
news:mailman.1025168582.8834.comp.lang.ada@ada.eu.org...
> > Eh... What is elaboration? Can it be explained in C++ terms?
>
> Not knowing C++, I'll use Ada terminology :-b
>






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Elaboration Schmelaboration...
  2002-06-28 12:57 ` Marin David Condic
@ 2002-06-29  0:15   ` Ted Dennison
  0 siblings, 0 replies; 5+ messages in thread
From: Ted Dennison @ 2002-06-29  0:15 UTC (permalink / raw)


Marin David Condic wrote:
> O.K., but C++ also has declarations, so there *is* an analogy. Granted, the
> whole scheme of things is dramatically different, (Header files don't
> actually "execute" and inclusion of such things is lexical inclusion, etc.)
> but you can see the same sort of things happening. When declaring an object
> of a given class, space is allocated, its constructors are executed, etc.
> That would be "elaboration" in a broad sense of the word.

Closer would be the initialization of C++ static members, particularly 
if you assign initial values based on a function call. You can even get 
into some of the same issues, if you do this a lot and some of the 
initilizations depend on other static members being initialized.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-29  0:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-27  8:58 Elaboration Schmelaboration Grein, Christoph
2002-06-28 12:57 ` Marin David Condic
2002-06-29  0:15   ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2002-06-27  8:46 David Rasmussen
2002-06-27 13:34 ` Georg Bauhaus

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