HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Arrays

10-21-2003, 11:56 AM#1
curi
if i make an array with 10 slots, are they from 0-9 or 1-10 ?
10-21-2003, 12:33 PM#2
TheZaCrew
0-9 I think that is what most program languages uses etc. c++ php
10-21-2003, 04:31 PM#3
Draco
That is the array size. You're not thinking about it the right way.

If the size is 5, you can use any number for the array number.
10-21-2003, 05:02 PM#4
QuatreDan
emote_confused I've always wondered that. If you can use any array number in an array regardless what "size" you make it, then what's the significance of the "size" of an array? emote_sweat
10-21-2003, 05:09 PM#5
Sagan
So if the array "size" is lets say 3. Can I use 1, 3, 1000? But not 0, 1, 2, 3? (because the first are three numbers and the second are four numbers)
10-21-2003, 05:30 PM#6
element_5
The arrays in WE are dynamic. Setting their "size" is only for initializing values. Example, you create an integer array with a size 5 and a default value of 3. Elements 0 - 4 of that array will be initialized with the value 3. You can still access and store information in any other element of the array, say element 10 or 1000.