Variables limit?

Posted By: LawnmowerMan

Variables limit? - 07/01/10 14:41

Did A7 have a some limit of the number of variables, and did is problem if i want reset more of 100 variables to zero in one function?
Posted By: Damocles_

Re: Variables limit? - 07/01/10 15:13

You can use an array with thousands of entries for that purpose.

Would be hard to reach a limit, as long as you dont use
some mega-math functions.
Posted By: LawnmowerMan

Re: Variables limit? - 07/01/10 16:01

That means I can use an unlimited number of different names for variables in my code. Thank you for your reply, this is more important to me.

One more thing. Did is a speed of reading function, same in the following examples. I use different names for the variables, but in this example I'll write all variables with name task1-500

function reset_var(){
task1 = 0;
task2 = 0;
task3 = 0;
....
task500 = 0;
}

function reset_var(){
task1 = 0;
task2 = 0;
}

I do not know anything about the speed of reading the code in engine. How this work?
Posted By: Damocles_

Re: Variables limit? - 07/01/10 17:59

better you use an array (and a "while" or "for" loop)for that.
So you dont have to write the variable names manually
and just use an index on an array.
© 2023 lite-C Forums