I declared this inside one function:

void function()
{
    ....
    static const int iLimit = GetLimit();
    int iL = a_MyArray[iLimit];
    ....
}

The code compiles ok in g++. What I want to know is whether the GetLimit function will be called only once (At the first call to function() ?). Plz help. Thanks