comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jeffrey.carter@boeing.com>
Subject: Re: STATIC types in ADA?
Date: Fri, 1 Mar 2002 17:51:56 GMT
Date: 2002-03-01T17:51:56+00:00	[thread overview]
Message-ID: <3C7FBFBC.FEC20446@boeing.com> (raw)
In-Reply-To: 3c7f8fd6$0$7055$43695faf@reader

jhuber@nlxcorp.ellsworth.com wrote:
> 
> Do STATIC data types (like C++ has) exist in ADA?
> 
> By this I mean, is there a way I can define a variable so that
> when I call a procedure and set a value (say 5.0) and then
> exit the procedure and come back into it at a later time, the
> variable would still have the same value (i.e., 5.0)?

In Ada such a variable (not a type) is considered to contain state
information. State information is typically saved in variables in the
same package body as the subprograms that manipulate the state. In
multitasking situations (which don't arise in C++), state information is
typically saved in a protected object and manipulated by the protected
object's operations.

-- 
Jeffrey Carter



  parent reply	other threads:[~2002-03-01 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-03-01 20:42 Gautier Write-only-address
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox