In FOR loops
I have just found out someting interesting writing a script.
This is about a variable i in a loop.
Example :
Given a function drawObject(x,y) with
for ( i = 1; i < n+1; i++)
{ // code which acts with i }
In onLoad(), I have written a loop to draw 10 objects calling drawObject :
for ( i = 0; i < 10; i++)
{ // code to reckon x et y (depends on i )
// then call drawobject(x,y)
}
We yield only 1 object instead of 10 !
For instance, for ( j = 1; j < n+1; j++) in drawObject
Yet, these loops are not included, but it acts as if. Bug, huh ?
Coming from C++ and PHP world, it's a tough time.