My bad - empty square brackets are not required.
After a quick test it seems that everything I said was wrong
This gives the results 5, 10, 20 as expected from the help files. Although I don't like it. I would prefer the result to be 35, 5, 10 but hey, that's just how it is.
dim myArray[5, 10, 20]
do
print( myArray.length )
print( myArray[0].length )
print( myArray[0,0].length )
sync()
loop
myArray.length = -1 clears all of the array
myArray[0,0].length = -1 clears the last dimension of the array, so the results are now 5, 10, -1
myArray[0].length = -1 clears the last two dimension of the array so the results are now 5, -1 followed by an error unless you comment out the last print statement.
I don't like how it works. I think myArray.length should return the complete length of all dimensions and then [0] would refer to the first dimension, [0,0] the second etc. but it doesn't seem to work that way.