Quote: "When using the "SORT ARRAY RANGE" this works clearly enough. But when reading the documentation for "SET ARRAY SORT" I have no idea what this is doing? Is this a performance item?"
Yes, this is a performance item. It allows you to choose one of the available sorts for sorting the specified array. Some sorts are faster than others in certain circumstances.
Here is a nice visual demonstration of a few sorts and you will see some are faster than others at sorting certain situations.
Quote: "Also regarding "SET ARRAY SORT" what is a UDT and Non-UDT array?"
A UDT array is an array of User-Defined Types. E.g
Type MyType
x as integer
y as integer
Endtype
Dim Array(10) as MyType
Quote: ""CLEAR ARRAY ITEM Array(), Index" seems to work in the fashion of clearing the item to a 0. But what I'm confused about here is what does it mean by "Index""
An index is the location of a cell in an array. For multi-dimensional arrays it appears they are stored column by column. If anyone can confirm this please do so. Have a look at this snippet:
Dim Array(10, 5) as integer
Array(4,1) = 20
set array index Array(), 15
print Get Array Index( Array())
print Array(Get Array Index( Array()))
wait key
end
It also appears that the command seems to skip the final row, e.g Array(10, n).
Dim Array(10, 5) as integer
Array(0,1) = 20
set array index Array(), 11
print Get Array Index( Array())
print Array(Get Array Index( Array()))
wait key
end
Quote: "I've been reading the documentation further this evening and I *THINK* the "ROTATE ARRAY" command may answering my question #4"
Looks like it.
Quote: "
If I clear an array item can I re-populate it with a random number? "
You should be able to, try it.