HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Arrays

05-25-2008, 01:48 AM#1
Hydrolisk
If a variable had an array of 2 (say, in GUI), would that mean I can use 0, 1, and 2? or only 0 and 1?

Bonus Question (just came into my head): Is "assembly" and "binary" the same thing? I highly doubt it, but if anybody could elaborate, I'd be very grateful.
05-25-2008, 02:29 AM#2
TheDamien
Quote:
Originally Posted by Hydrolisk
If a variable had an array of 2 (say, in GUI), would that mean I can use 0, 1, and 2? or only 0 and 1?

No. All the size feature does is initialize the first n indexes of an array to the default value you have set.

Quote:
Originally Posted by Hydrolisk
Bonus Question (just came into my head): Is "assembly" and "binary" the same thing? I highly doubt it, but if anybody could elaborate, I'd be very grateful.

No. Binary is a numbering system, assembly is a very low-level language used for computer programming.

Machine code is also not the same thing as assembly, but it is very close (an assembly language is essentially a slightly abstracted representation of the machine code for whichever CPU architecture you're programming for).
05-25-2008, 02:36 AM#3
darkwulfv
When you create an array you have access to every single slot. All the variable editor does is sets the values of the "size" you made it as to the value you gave.
05-25-2008, 08:26 AM#4
Captain Griffen
All arrays have indexes 0 - 8191 (8192, technically, but that last one doesn't carry over in saves so isn't really used).