easy question: persistent/static vars?

 
I'd like to declare a variable that keeps/retains its value between iterations of the advisor. In other words, I'd like to be able to set the value of a variable, have the advisor exit, and then access the variable the next time the expert is executed.

I think I saw this in another thread, but can't locate it now.

Thanks in advance!

Alan
 
all the global scope variables are static
static variables in the local scope
 
In same topic as above.

as example if have

int x() 
{
for(int i=0;...)<operation>;
}



and have

int start()
{
for(int i=0;...)<someOtherOperation>;
}



compiler says:
'i' - variable is already defined ...

I understand "local" to mean scope is within function x()
Meaning "int i" in function start() should be allowed.
ie: different function, different name space etc.

Following help text is saying local = local scope therefor identifier name should be available for reuse in any other function... YES?
[I use MetaEditor 4.00 Build 191]

Navigator help states:

Global variables are defined at the same level as functions, i.e. they are not local in any block. ... Scope of global variables is the entire program. Global variables are accessible from all functions defined in the program.


and

A variable declared inside any function is local. The scope of a local variable is limited to the function range inside which it is declared. ... Local variables are stored in memory area of the corresponding function.