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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c3cec4fb2011babb X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: Are global or persistent variables in ADA? Date: 1998/04/25 Message-ID: <35420cc3.0@news.pacifier.com>#1/1 X-Deja-AN: 347601382 References: <35413389.46570978@news.gatech.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Newsgroups: comp.lang.ada Date: 1998-04-25T00:00:00+00:00 List-Id: Brian Franklin wrote in message <35413389.46570978@news.gatech.edu>... > I haven't found this in any of my books on ADA. Can I have a >procedure retain it's variable value after it returns to it's calling >routine? In C I can use STATIC in declaring such a variable. > >As an alternative is it possible to have a global variable available > to all the modules and by this I mean available to outside packages. > The closest parallel to having a STATIC variable inside a procedure is to declare the variable inside the package containing the procedure, but outside of any procedures in that package. Fully global variables are declared inside of a package spec (IMHO not a good practice). I hope this helps, SteveD