From: "Gautier Write-only-address" <gautier_niouzes@hotmail.com>
Subject: Re: STATIC types in ADA?
Date: Fri, 01 Mar 2002 20:42:13 +0000
Date: 2002-03-01T20:42:13+00:00 [thread overview]
Message-ID: <mailman.1015015382.4367.comp.lang.ada@ada.eu.org> (raw)
>Do STATIC data types (like C++ has) exist in ADA?
...
>I think private is the closest thing I've found that will do it.
It's much simpler. Ada is a block-structured language.
A variable declared outside of procedure or package P is
"static" relatively to P. Inside of P, it is a local variable
just to be used by P. Where a variable is visible, it is alife
and keep its value.
Ex:
package body P is
i: Integer;
procedure Q is
j: integer;
function R(...) return ... is
k: integer;
begin
-- here i,j,k are visible
...
end R;
begin
j:= ...
i:= i+j;
end Q;
begin
i:= 0;
Q;
-- i has changed
Q;
-- again...
end P;
________________________________________________________
Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm
NB: For a direct answer, address on the Web site!
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
next reply other threads:[~2002-03-01 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-01 20:42 Gautier Write-only-address [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-01 14:27 STATIC types in ADA? jhuber
2002-03-01 15:06 ` Jim Rogers
2002-03-01 15:33 ` Matthew Heaney
2002-03-01 17:51 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox