comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <chris.danx@ntlworld.com>
Subject: Re: Initialising stuff
Date: Tue, 16 Oct 2001 22:26:01 +0100
Date: 2001-10-16T22:26:01+01:00	[thread overview]
Message-ID: <tB1z7.4699$nT1.823830@news6-win.server.ntlworld.com> (raw)
In-Reply-To: TW0z7.31810$ev2.38911@www.newsranger.com


"Ted Dennison" <dennison@telepath.com> wrote in message
news:TW0z7.31810$ev2.38911@www.newsranger.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?

It's private and global inside the screens package, outside it can't be
accessed.  The operations such as put, gotoxy etc manipulate the variable,
and to ensure proper working it requires initialisation.



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






  reply	other threads:[~2001-10-16 21:26 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
2001-10-16 21:26   ` chris.danx [this message]
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