TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Igor Izvarin <[log in to unmask]>
Fri, 4 Dec 1998 17:48:16 +0300
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