Hi,
I have an internal function outside of main(), which is called getString(i). I put a debugPrintln statement inside getStrong and found that this function is called from bar 1 to the current bar, in my case, it's 2846. But in my main(), the internal function should only be called when bar count is 2840 or above. I thought what's outside the main(), i.e. internal functions, are not executed by the interpreter. So, why do I get a print statment from within getString from all the bars? I dont' understand.
William
I have an internal function outside of main(), which is called getString(i). I put a debugPrintln statement inside getStrong and found that this function is called from bar 1 to the current bar, in my case, it's 2846. But in my main(), the internal function should only be called when bar count is 2840 or above. I thought what's outside the main(), i.e. internal functions, are not executed by the interpreter. So, why do I get a print statment from within getString from all the bars? I dont' understand.
William
PHP Code:
main()
{
//some code here
if (getCurrentBarCount()>=2840)
{
returnstring = efsinternal("getString", 22 );
}
//some code here
}
function getString(i)
{
var ret = "";
var ch=0;
var x=0;
debugPrintln("inside getString" + i +" BarCount = "+getCurrentBarCount());
for (x=0; x<i; x++)
{
ch = d.call("JSgetS");
debugPrintln("ch = "+ch);
if (ch>=0)
{
ret = ret+String.fromCharCode(ch);
}
}
return ret;
}
Comment