Closed Thread Icon

Topic awaiting preservation: The var Statement Pages that link to <a href="https://ozoneasylum.com/backlink?for=26855" title="Pages that link to Topic awaiting preservation: The var Statement" rel="nofollow" >Topic awaiting preservation: The var Statement\

 
Author Thread
ZOD
Bipolar (III) Inmate

From:
Insane since: Jun 2002

posted posted 10-16-2005 19:50

Is there any practical limit to the number of variables which can be declared using a single var statement? For instance if I have a script with 50 global variables is it more efficient to declare them all in a single var statement or to break it up into say 10 variables per statement? Readability isn't a factor btw.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-16-2005 20:08

There's no efficiency issue. But why would you have 50 variables? Maybe you should be using an array?


 

ZOD
Bipolar (III) Inmate

From:
Insane since: Jun 2002

posted posted 10-16-2005 21:43

Thanks. I just used 50 as an example. My application has 22 global variables, four of which are arrays. I usually put my strings into arrays.

« BackwardsOnwards »

Show Forum Drop Down Menu