// define global variables
float ao = 0;
float bo = 0;
int mand(float x, y){ //user-defined function
int a = x/2;
int b = y/3;
int i = a+b;
ao = a; // pass values a to global variable ao
bo = b; // pass values b to global variable bo
return(i);
}
v@Cd = set(ao, bo, mand(1, 0.3)); // use variables ao and bao in main program, as well as i, for example in color attribute
Is it somehow possible to access global variables in my function? It worked like this in Javascript. Or is there a possibility to return three values from my function and use them all later?
Thanks!