functions with states

Valery A.Khamenya khamenya@module.ru
Wed, 3 May 2000 01:49:53 +0400


Dear clean-list,

My question concerns with "refined" side effect. In C we can use static
variables in such a way:

int foo()
{
    static int foo_counter =0;
    foo_counter++;
    /* ... */
    return foo_counter;
}

what should I do for such a counting of function calls in Clean ?
Please, don't offer me to use profilers or my favorite WrapDebug library  :)

thank you,
best regards,
Valery A.Khamenya