From: "Steve Doiel" <nospam_steved@pacifier.com>
Subject: Re: Are global or persistent variables in ADA?
Date: 1998/04/25
Date: 1998-04-25T00:00:00+00:00 [thread overview]
Message-ID: <35420cc3.0@news.pacifier.com> (raw)
In-Reply-To: 35413389.46570978@news.gatech.edu
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
next prev parent reply other threads:[~1998-04-25 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-25 0:00 Are global or persistent variables in ADA? Brian Franklin
1998-04-25 0:00 ` Brian Franklin
1998-04-25 0:00 ` Tom Moran
1998-04-25 0:00 ` Steve Doiel [this message]
1998-05-01 0:00 ` Matthew Heaney
1998-04-29 0:00 ` Alan E & Carmel J Brain
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox