From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,905a7c70138a61ab X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 14:30:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: Subject: Re: Initialising stuff MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Tue, 16 Oct 2001 22:26:01 +0100 NNTP-Posting-Host: 62.253.13.246 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1003267545 62.253.13.246 (Tue, 16 Oct 2001 22:25:45 BST) NNTP-Posting-Date: Tue, 16 Oct 2001 22:25:45 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:14753 Date: 2001-10-16T22:26:01+01:00 List-Id: "Ted Dennison" wrote in message news:TW0z7.31810$ev2.38911@www.newsranger.com... > In article , 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.