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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,73f097f1e2686cf5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-07 06:03:53 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttln1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: <9n9r4c$srt$1@snipp.uninett.no> Subject: Re: Simplest way to protect a variable ? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Fri, 07 Sep 2001 13:03:52 GMT NNTP-Posting-Host: 24.248.45.203 X-Complaints-To: abuse@home.net X-Trace: news1.sttln1.wa.home.com 999867832 24.248.45.203 (Fri, 07 Sep 2001 06:03:52 PDT) NNTP-Posting-Date: Fri, 07 Sep 2001 06:03:52 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:12887 Date: 2001-09-07T13:03:52+00:00 List-Id: Have you considered using a function instead of an array? That is: Define a function in the package spec (use pragma Inline if performance is an issue) then initialize the array in the package body and have the function return an eleement. SteveD "Reinert Korsnes" wrote in message news:9n9r4c$srt$1@snipp.uninett.no... > Hi, > > Let's say I initiate a "global" variable, A (for example an array), by > calling a procedure (which may read data from a file). And I want to be > sure that the content (value) of this variable is not changed by > another procedure. The variable is "global" in the sense that it is > available in many many other routines. > > I may have several co-programmers I do not trust :-) > > What is the simplest way to do this (in Ada) ? > > reinert > > -- > http://home.chello.no/~rkorsnes