TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-Transfer-Encoding: 7bit
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: Igor Izvarin <[log in to unmask]>
Date: Fri, 4 Dec 1998 17:48:16 +0300
Content-Type: text/plain; charset="koi8-r"
MIME-Version: 1.0
Parts/Attachments: text/plain (25 lines)
Hello everybody.

I am novice in Ada programming and just came from C/C++. Sorry I could not
find another discussion forum on Internet more technical so I am asking
question here.

I translate my source code from C/C++ and meet one feature I can not
resolve: the static variables in Ada.

The example:

In C:

Int foo()
{
static int v;
v = init_static();
...
}

and the v variable will hold the value between calls. How can I do this in
Ada?

Thank you.

ATOM RSS1 RSS2