Why have TBDev developers used $TBDEV array instead of many variables?

Started by spark, February 17, 2014, 12:23:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Thanks for your answers guys, IMO as a total noob it's more difficult to read when you have single quotation marks inside square brackets. Also the developer never defined the array before he started assigning the values.

Anyway it's not a big deal, I just wanted to know the opinion of professional coders like yourselves




I don't think you should consider this from a performance standpoint, rather, look at it from a readability standpoint. The second version collects, well, a collection of things, into a single storage mechanism; from a readability standpoint it's superior.

Not that it matters, but from a performance standpoint I can't imagine the second one costs much, if anything, certainly not enough to overcome the readability benefit.

pretty much says it all in my oppinion


the discussion suggests its next to nothing in it and its actually more tidy to use arrays then many variables

also the ease of access to the code

QuoteStoring all your data in one array could be faster, depending on how you're handling your data. I would recommend grouping each group of data that has a close relation to eachother in an array.


Excuse my ignorance but what is wrong -in TBDev's case- with using many variables instead of an array?

The below discussions suggest that it's faster to use many variables