TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Igor Izvarin <[log in to unmask]>
Reply To:
Date:
Fri, 4 Dec 1998 17:48:16 +0300
Content-Type:
text/plain
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