comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: Initialising stuff
Date: Tue, 16 Oct 2001 20:40:19 GMT
Date: 2001-10-16T20:40:19+00:00	[thread overview]
Message-ID: <TW0z7.31810$ev2.38911@www.newsranger.com> (raw)
In-Reply-To: EA0z7.4255$nT1.766306@news6-win.server.ntlworld.com

In article <EA0z7.4255$nT1.766306@news6-win.server.ntlworld.com>, chris.danx
says...
>I need a variable (global) for a screen package (write to video memory) and
>would like it to be initialised once and once only when the package is
>"with"ed.

Why not just initialize the variable where it is declared then?

>package body xxx is
>   ...
>begin
>   initialise screen stuff here;
>end xxx;

That'll work too. The only possible "issues" are if you try to reference stuff
in another package here, you have to make sure that package (and everything it
depends on) has already been elaborated. But if its a one-liner, you might as
well just initialize the variable at the declaration and be done with it.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



  reply	other threads:[~2001-10-16 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-16 20:16 Initialising stuff chris.danx
2001-10-16 20:40 ` Ted Dennison [this message]
2001-10-16 21:26   ` chris.danx
2001-10-17  2:42     ` Jeffrey Carter
2001-10-18  8:18       ` chris.danx
2001-10-16 22:54 ` Mark Johnson
2001-10-16 23:27   ` chris.danx
replies disabled

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