Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,796 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Variables limit? #331004
07/01/10 14:41
07/01/10 14:41
Joined: Jun 2010
Posts: 71
L
LawnmowerMan Offline OP
Junior Member
LawnmowerMan  Offline OP
Junior Member
L

Joined: Jun 2010
Posts: 71
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?

Re: Variables limit? [Re: LawnmowerMan] #331010
07/01/10 15:13
07/01/10 15:13
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
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.

Re: Variables limit? [Re: Damocles_] #331027
07/01/10 16:01
07/01/10 16:01
Joined: Jun 2010
Posts: 71
L
LawnmowerMan Offline OP
Junior Member
LawnmowerMan  Offline OP
Junior Member
L

Joined: Jun 2010
Posts: 71
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?

Re: Variables limit? [Re: LawnmowerMan] #331044
07/01/10 17:59
07/01/10 17:59
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
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.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1