Test a For loop

 

Have a look at this simple test-script:

int start()
{

int k=0;

int p=50;

for(int i2 = 0; i2 < p; i2++)
{
for(int i3 = 0; i3 < 5 ; i3++)
{
k = i2+i3;
Print(k);
}
}
return(0);
}

As long as p is smaller than 50 the first value of k is 0 (zero) as it should be. But if I make p larger than 50 the first value of k is no longer zero but 5 or 6 or 7 and so on. I've tried to restart my terminel several times but it didn't help me to solve this strange behaviour of this script. Any help would be much appriciated.

Hendrick

 
Hendrick:

But if I make p larger than 50 the first value of k is no longer zero but 5 or 6 or 7 and so on. I've tried to restart my terminel several times but it didn't help me to solve this strange behaviour of this script. Any help would be much appriciated.

Check the contents of the log file in experts\logs\yyyymmdd.log. On my computer the visual version of the log gets truncated (with older entries getting dropped) if an EA creates a large number of entries in a short period of time. The log file on disk does contain all entries.

 
jjc:
Hendrick:

But if I make p larger than 50 the first value of k is no longer zero but 5 or 6 or 7 and so on. I've tried to restart my terminel several times but it didn't help me to solve this strange behaviour of this script. Any help would be much appriciated.

Check the contents of the log file in experts\logs\yyyymmdd.log. On my computer the visual version of the log gets truncated (with older entries getting dropped) if an EA creates a large number of entries in a short period of time. The log file on disk does contain all entries.


Thanks jjc! Checked the log file and all the entries were there. Thanks again.