This command will return the number of items in the array.
Return Integer=ARRAY COUNT(Array Name(0))
The name of the array followed by a pair of brackets ( ). You can also insert a value of zero, i.e. arrayname(0)
This value is an integer number such as 1.
This is usually the value used to create the array when the DIM command was used, however by modifying the dynamic array this value can change throughout the execution of the program. When an array is completely empty, it will return a count of -1. The count refers to the number of available indexes, and so will return a count of zero when the command DIM arr(0) is used, representing the fact a single subscript is available at index zero.
DIM array(0) FOR T=1 TO 5 ARRAY INSERT AT BOTTOM array() NEXT T PRINT ARRAY COUNT(array()) WAIT KEY