Hi,
I pass a variable from my start() function to a NewValue() function and there I update some varaibles.
I have used as below
Int NewValue(int new, int old)
{
int supervalue;
if (old > something)
{
old=new;
}
if (condition)
{
supervalue = iSomething(old);
return (supervalue)
}
}
start()
{
int old ;
int new ;
int SVal = 0;
new = iMA(...);
SVal = NewValue (new,old);
Print (old + new + SVal);
}
My problem is that if i see the journal, the old variable is reset to zero everytime.
I want to keep the old value.
Any Advice .
I pass a variable from my start() function to a NewValue() function and there I update some varaibles.
I have used as below
Int NewValue(int new, int old)
{
int supervalue;
if (old > something)
{
old=new;
}
if (condition)
{
supervalue = iSomething(old);
return (supervalue)
}
}
start()
{
int old ;
int new ;
int SVal = 0;
new = iMA(...);
SVal = NewValue (new,old);
Print (old + new + SVal);
}
My problem is that if i see the journal, the old variable is reset to zero everytime.
I want to keep the old value.
Any Advice .