From: "Theodore E. Dennison" <dennison@escmail.orl.mmc.com>
Subject: Re: C to Ada (static)
Date: 1996/04/26
Date: 1996-04-26T00:00:00+00:00 [thread overview]
Message-ID: <31816109.7D55368C@escmail.orl.mmc.com> (raw)
In-Reply-To: 4lr2eq$o3c$1@mhadf.production.compuserve.com
Heinz-Gerd Kuester wrote:
>
> How do I translate this to ADA?
>
> void myfunc (void)
> {
> static int number; /* <= the static stuff in Ada? */
>
> }
Ada doesn't have anything like static variables. To get the same
functionality, you will have to declare the variable globally
somewhere visible to that routine.
Example:
package body My_Package is
Number : Integer;
procedure My_Procedure is
begin
...series of statements...
end My_Procedure;
end My_Package;
--
T.E.D.
| Work - mailto:dennison@escmail.orl.mmc.com |
| Home - mailto:dennison@iag.net |
| URL - http://www.iag.net/~dennison |
next prev parent reply other threads:[~1996-04-26 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-26 0:00 C to Ada (static) Heinz-Gerd Kuester
1996-04-26 0:00 ` Theodore E. Dennison [this message]
1996-04-27 0:00 ` Robert Dewar
1996-04-26 0:00 ` Joerg Rodemann
1996-04-26 0:00 ` Laurent Guerby
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox