Here's code from the official AppGameKit 2 arrays documentation.
myArray as integer[5] = [3,4,1,5,2,6]
myArray.sort() // array is now [1,2,3,4,5,6]
index = myArray.find(4) // will return "3" as array indexes start at 0
If I declare an array in a C-scripted language like PHP with a size of 5, then I can ONLY put 5 elements into that array. Yes, the first index is 0, so the last index would be 4. But no matter how you look at it, there can ONLY be 5 elements in that array (0, 1, 2, 3, 4). In a BASIC language like AppGameKit, it is the same, but with an index starting with 1 (1, 2, 3, 4, 5).
Question: is this showing that AppGameKit is flexible enough to allow the programmer to add extra elements to an array, or is there an error in documentation? I've never seen a language where you declare the size of an array, and it gives you a size + 1.
EDIT:
Also, is there a way to do a 2D or 3D array? Can't seem to find that in the docs.
Senior Software Engineer - RotoGrinders