Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, AndrewAMD), 1,505 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | chip programmers | 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