comp.lang.ada
 help / color / mirror / Atom feed
From: And838N@netscape.net
To: comp.lang.ada@ada.eu.org
Subject: Visibility and Elaboration
Date: Mon, 09 Jun 2003 06:47:24 -0400
Date: 2003-06-09T06:47:24-04:00	[thread overview]
Message-ID: <mailman.13.1055155677.1173.comp.lang.ada@ada.eu.org> (raw)

David C. Hoos, Sr. wrote:
>If you look at your original post (on June 4), there was no "put_line"
>statement -- hence, the reason for my question
Ok, your right, there was no put_line statement.  There was only the
"put" statement.  The compiler would still have complained.

>GNAT did _not_ tell you it didn't know which one to use.
Ok, that must be why I wrote "Thus, GNAT's compiler message tells me 
not that GNAT can't determine which count to use but that I need to 
specify, for future readers, which count I needed."

>Using the GNAT compiler, the object file resulting from the
>compilation of your package would contain a procedure named 
>my_pkg___elabs. That procedure contains the elaboration code for your 
>package specification.
Cool!  I'm going to check that out.  Thank you.

>Elaboration is nothing at all like the instantiation of a C++ class.
Ok, elaboration is like the "preparation" of something declared static 
in C++ or Java? So your saying that all the elaborations in the 
following code happen before the main procedure is called?

with
ada.text_io,
ada.integer_text_io;

use
ada.text_io,
ada.integer_text_io;

procedure newelaboration is

    procedure doelaboration(i: integer) is
        package elo is
            value: Integer;
            procedure printvalue;
        end elo;

        package body elo is
            procedure printvalue is
            begin
                put(value);
            end printvalue;
        end elo;
    
    begin
        if i < 10 then
            elo.value := i;
            doelaboration(i+1);
            elo.printvalue;
        end if;
    end doelaboration;

begin

doelaboration(1);

end newelaboration;

So using the "new" reserved word is different than an elaboration?

Thanks for the help!

Andrew


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455



             reply	other threads:[~2003-06-09 10:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-09 10:47 And838N [this message]
     [not found] <7BD8CDF4.671052CE.0015D3EC@netscape.net>
2003-06-09 11:35 ` Visibility and Elaboration David C. Hoos, Sr.
2003-06-09 18:14   ` Robert I. Eachus
2003-06-09 18:29     ` tmoran
2003-06-11  6:50       ` Robert I. Eachus
2003-06-11  7:49         ` tmoran
2003-06-11 21:11           ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10  8:33 And838N
2003-06-11 10:40 And838N
replies disabled

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