I have a question about the execution sequence of functions. For example, in the code below, because it prints y = 2.0 and not y = 4.0 and because it prints w = 0.5 and not w = 2.2. The y = 2.0 understand that it looks for the value that are closer. So far so good. But why w = 0.5 and not 2.2 what is the value of the global variable? Is there any sort of execution priority?
float w = 2.2;
float y = 3.0;
void setup(){
y = 2.0;
float x = fn(w + y, y);
println(x + "," + y + "," + w);
}
float fn(float x, float y){
w = 0.5;
y = 4.0;
return w + x + y;
}