
03-10-2002, 05:43 AM
|
|
is watching you
|
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
|
|
|
quite simple
a array is like a lot of variables all in one variable
u can set variables like this:
arrayname={0,0,0}
or setarrary arrayname,3;
each would produce the array, arrayname={0,0,0}
and u can use variables out of the array by using indexes, like this
lets say there is a array 'nums' and it is equal to {3,5,7}
say2 #v(arrayname[index]);
so if the index was 2 it would show 7
u must remember that the indexes start with 0, not 1
so
nums[0] - 3
nums[1] - 5
nums[2] - 7
also, if you want to set a value in a array, just do this:
arrayname[index]=whatevervarialbe; |
__________________
[signature]insert here[/signature]
|
|
|
|