comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: static objects in ADA
Date: 1999/04/21
Date: 1999-04-21T00:00:00+00:00	[thread overview]
Message-ID: <7fl8rh$l9n$1@nnrp1.dejanews.com> (raw)
In-Reply-To: YsRFDEAtZbH3EwNc@tioman.demon.co.uk

In article <YsRFDEAtZbH3EwNc@tioman.demon.co.uk>,
  Mark Elson <marke@tioman.demon.co.uk> wrote:
> Hi,
>
> I'm a C++ programmer who is new to ADA. I've looked briefly in the Ref
> Manual and the FAQ but I can't find the answer to the following question
>
> Is there an equivalent declaration (in ADA 95) to the static used in
> C++, i.e. so that objects are created at link time rather than at run
> time?

Sure. Declare them in the package body that your routine is declared in
instead of in the routine itself.

Unless you have a really large initialized object, it shouldn't make too much
difference in runtime performance though.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1999-04-21  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-21  0:00 static objects in ADA Mark Elson
1999-04-21  0:00 ` Marin David Condic
1999-04-21  0:00 ` dennison [this message]
1999-04-21  0:00 ` Stephen Leake
1999-04-22  0:00 ` Samuel Mize
1999-04-25  0:00   ` Mark Elson
1999-04-25  0:00     ` Robert Dewar
1999-04-26  0:00     ` dennison
1999-04-26  0:00       ` Robert Dewar
1999-05-07  0:00     ` Mark Elson
1999-05-07  0:00       ` dennison
1999-04-25  0:00 ` Matthew Heaney
replies disabled

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